1 # 2 # CDDL HEADER START 3 # 4 # The contents of this file are subject to the terms of the 5 # Common Development and Distribution License (the "License"). 6 # You may not use this file except in compliance with the License. 7 # 8 # You can obtain a copy of the license at src/sun_nws/OPENSOLARIS.LICENSE 9 # or http://www.opensolaris.org/os/licensing. 10 # See the License for the specific language governing permissions 11 # and limitations under the License. 12 # 13 # When distributing Covered Code, include this CDDL HEADER in each 14 # file and include the License file at src/sun_nws/OPENSOLARIS.LICENSE. 15 # If applicable, add the following below this CDDL HEADER, with the 16 # fields enclosed by brackets "[]" replaced with your own identifying 17 # information: Portions Copyright [yyyy] [name of copyright owner] 18 # 19 # CDDL HEADER END 20 # 21 # 22 # Copyright 2008 Sun Microsystems, Inc. All rights reserved. 23 # Use is subject to license terms. 24 # 25 #ident "@(#)Makefile 1.8 08/06/26 SMI" 26 # 27 # src/sun_nws/iscsid/Makefile 28 # 29 30 include ../Makefile.config 31 include ../Makefile.cmds 32 33 BUILD64 = $(POUND_SIGN) 34 35 MODULE = iscsid 36 37 SEC_ATTRS = $(PROTO_ROOT)/etc/security 38 SVC_MANIFEST = $(PROTO_ROOT)/var/svc/manifest/network 39 SVC_METHOD = $(PROTO_ROOT)/lib/svc/method 40 41 CPPFLAGS32 += $(DTEXTDOM) 42 43 MODULE_PKGS = SUNWiscsir 44 45 CLASS_ACTIONS = $(ON_REF_GATE)/usr/src/pkgdefs/common_files/i.manifest 46 CLASS_ACTIONS += $(ON_REF_GATE)/usr/src/pkgdefs/common_files/r.manifest 47 CLASS_ACTIONS += $(ON_REF_GATE)/usr/src/pkgdefs/common_files/i.rbac 48 CLASS_ACTIONS += $(ON_REF_GATE)/usr/src/pkgdefs/common_files/r.rbac 49 CLASS_ACTIONS += $(CLASS_ACTIONS_DIR)/i.iscsiconf 50 51 PKG_PROJ_DEPENDS = iscsi 52 53 COMMON_SRC = iscsi_door.c 54 55 sparc_SRC = 56 57 i386_SRC = 58 59 MODULE_SRC = $(COMMON_SRC) 60 MODULE_SRC += $($(MACH)_SRC) 61 62 MODULE_OBJ_32 = $(MODULE_SRC:%.c=$(OBJ32)/%.o) 63 MODULE_OBJ_64 = 64 65 BINARY32 = $(OBJ32)/$(MODULE) 66 BINARY64 = 67 BINARIES = $(BINARY32) 68 69 COMMON_INCLUDES += -I$(COM_INC_ISCSI) 70 COMMON_INCLUDES += -I$(COMMON_ISCSI_IMPL_HDRS_DIR) 71 72 sparc_INCLUDES = 73 i386_INCLUDES = 74 75 LDLIBS = -ldoor 76 LDLIBS += -lnsl 77 LDLIBS += -lrt 78 79 LDLIBS32 = -L$(ON_LIB_32) 80 LDLIBS32 += $(LDLIBS) 81 82 LDLIBS64 = 83 84 LINT_TARGETS = cmd_lint32 85 86 # Handle creating our directories when needed 87 DIRS += $(SEC_ATTRS) 88 DIRS += $(LCMESSAGES) 89 DIRS += $(SVC_MANIFEST) 90 DIRS += $(SVC_METHOD) 91 92 93 ALLPREQ = $(OBJ32) 94 ALLPREQ += .WAIT 95 ALLPREQ += $(BINARIES) 96 97 INSTALLPREQ = all 98 INSTALLPREQ += .WAIT 99 INSTALLPREQ += $(SEC_ATTRS) 100 INSTALLPREQ += $(SVC_MANIFEST) 101 INSTALLPREQ += $(SVC_METHOD) 102 INSTALLPREQ += .WAIT 103 INSTALLPREQ += $(SEC_ATTRS)/exec_attr.iscsi 104 INSTALLPREQ += $(SVC_MANIFEST)/iscsi_initiator.xml 105 INSTALLPREQ += $(SVC_METHOD)/iscsid 106 INSTALLPREQ += $(LCMESSAGES) 107 108 PKGPREQ = install 109 PKGPREQ += .WAIT 110 PKGPREQ += $(PKG_PROJ_DEPENDS:%=%_installed) 111 PKGPREQ += $(PKGAREA) 112 PKGPREQ += .WAIT 113 PKGPREQ += $(MODULE_PKGS:%=$(PKGAREA)/%) 114 115 CLEANFILES = $(MODULE_OBJ_32) $(BINARY32) 116 117 CLOBBERFILES = 118 CLOBBERFILES += $(MOD_LINT_LIB) 119 120 NUKEFILES = $(CLOBBERFILES) 121 NUKEFILES += $(SEC_ATTRS)/exec_attr.iscsi 122 NUKEFILES += $(SVC_MANIFEST)/iscsi_initiator.xml 123 NUKEFILES += $(SVC_METHOD)/iscsid 124 NUKEFILES += $(MODULE_PKGS:%=$(PKGAREA)/%) 125 126 include ../Makefile.common 127 128 $(SVC_MANIFEST)/iscsi_initiator.xml: $(SRC_DIR)/iscsi_initiator.xml 129 $(INSTALL) -s -m 0444 -f $(SVC_MANIFEST) $(SRC_DIR)/iscsi_initiator.xml 130 131 $(SEC_ATTRS)/exec_attr.iscsi: $(SRC_DIR)/exec_attr 132 $(RM) -f $(OBJ32)/exec_attr.iscsi 133 $(CP) $(SRC_DIR)/exec_attr $(OBJ32)/exec_attr.iscsi 134 $(INSTALL) -s -m 0644 -f $(SEC_ATTRS) $(OBJ32)/exec_attr.iscsi 135 136 $(SVC_METHOD)/iscsid: $(BINARY32) 137 $(INSTALL) -s -m 0755 -f $(SVC_METHOD) $(BINARY32) 138 139