Home | History | Annotate | Download | only in iscsid
      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 2006 Sun Microsystems, Inc.  All rights reserved.
     23 # Use is subject to license terms.
     24 #
     25 #ident	"@(#)Makefile	1.7	06/09/15 SMI"
     26 #
     27 # src/sun_nws/iscsi_doorsrv/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 -lnsl -lrt
     76 
     77 
     78 LINT_TARGETS	= cmd_lint32
     79 
     80 # Handle creating our directories when needed
     81 DIRS += $(SEC_ATTRS)
     82 DIRS += $(LCMESSAGES)
     83 DIRS += $(SVC_MANIFEST)
     84 DIRS += $(SVC_METHOD)
     85 
     86 
     87 ALLPREQ 	 = $(OBJ32)
     88 ALLPREQ 	+= .WAIT
     89 ALLPREQ 	+= $(BINARIES)
     90 
     91 INSTALLPREQ	 = all
     92 INSTALLPREQ	+= .WAIT
     93 INSTALLPREQ	+= $(SEC_ATTRS)
     94 INSTALLPREQ	+= $(SVC_MANIFEST)
     95 INSTALLPREQ	+= $(SVC_METHOD)
     96 INSTALLPREQ	+= .WAIT
     97 INSTALLPREQ	+= $(SEC_ATTRS)/exec_attr.iscsi
     98 INSTALLPREQ	+= $(SVC_MANIFEST)/iscsi_initiator.xml
     99 INSTALLPREQ	+= $(SVC_METHOD)/iscsid
    100 INSTALLPREQ	+= $(LCMESSAGES)
    101 
    102 PKGPREQ		 = install
    103 PKGPREQ		+= .WAIT 
    104 PKGPREQ		+= $(PKG_PROJ_DEPENDS:%=%_installed)
    105 PKGPREQ         += $(PKGAREA)
    106 PKGPREQ		+= .WAIT
    107 PKGPREQ         += $(MODULE_PKGS:%=$(PKGAREA)/%)
    108 
    109 CLEANFILES	 = $(MODULE_OBJ_32) $(BINARY32)
    110 
    111 CLOBBERFILES	 = 
    112 CLOBBERFILES	+= $(MOD_LINT_LIB)
    113 
    114 NUKEFILES	 = $(CLOBBERFILES)
    115 NUKEFILES  	+= $(SEC_ATTRS)/exec_attr.iscsi
    116 NUKEFILES  	+= $(SVC_MANIFEST)/iscsi_initiator.xml
    117 NUKEFILES	+= $(SVC_METHOD)/iscsid
    118 NUKEFILES	+= $(MODULE_PKGS:%=$(PKGAREA)/%)
    119 
    120 include ../Makefile.common
    121 
    122 $(SVC_MANIFEST)/iscsi_initiator.xml: $(SRC_DIR)/iscsi_initiator.xml
    123 	$(INSTALL) -s -m 0444 -f $(SVC_MANIFEST) $(SRC_DIR)/iscsi_initiator.xml
    124 
    125 $(SEC_ATTRS)/exec_attr.iscsi: $(SRC_DIR)/exec_attr
    126 	$(RM) -f $(OBJ32)/exec_attr.iscsi
    127 	$(CP) $(SRC_DIR)/exec_attr $(OBJ32)/exec_attr.iscsi
    128 	$(INSTALL) -s -m 0644 -f $(SEC_ATTRS) $(OBJ32)/exec_attr.iscsi
    129 
    130 $(SVC_METHOD)/iscsid: $(BINARY32)
    131 	$(INSTALL) -s -m 0755 -f $(SVC_METHOD) $(BINARY32)
    132 
    133