Home | History | Annotate | Download | only in isns
      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.2	08/06/26 SMI"
     26 #
     27 # src/sun_nws/isns/Makefile
     28 #
     29 
     30 include ../Makefile.config
     31 include ../Makefile.cmds
     32 
     33 BUILD64	= $(POUND_SIGN)
     34 
     35 MODULE  	 = isns
     36 
     37 DATA_STORE	 = xml
     38 XML_DIR		 = ./xml_def
     39 
     40 SEC_ATTRS 	 = $(PROTO_ROOT)/etc/security
     41 SVC_MANIFEST 	 = $(PROTO_ROOT)/var/svc/manifest/network
     42 USR_SBIN 	 = $(PROTO_ROOT)/usr/sbin
     43 
     44 COPTFLAG	=
     45 COPTFLAG64	=
     46 
     47 CPPFLAGS32	+= $(DTEXTDOM)
     48 CPPFLAGS32	+= -DTARGET_DATA_STORE=$(DATA_STORE)
     49 CPPFLAGS32	+= -D_POSIX_PTHREAD_SEMANTICS
     50 
     51 MODULE_PKGS	 = SUNWisns
     52 MODULE_PKGS	+= SUNWisnsr
     53 
     54 CLASS_ACTIONS    = $(ON_REF_GATE)/usr/src/pkgdefs/common_files/i.manifest
     55 CLASS_ACTIONS   += $(ON_REF_GATE)/usr/src/pkgdefs/common_files/r.manifest
     56 CLASS_ACTIONS   += $(ON_REF_GATE)/usr/src/pkgdefs/common_files/i.rbac
     57 CLASS_ACTIONS   += $(ON_REF_GATE)/usr/src/pkgdefs/common_files/r.rbac
     58 
     59 PKG_PROJ_DEPENDS =
     60 
     61 DTRACE_PROVIDER        = isns_provider.d
     62 DTRACE_HEADER          = $(DTRACE_PROVIDER:%.d=$(OBJ32)/%.h)
     63 DTRACE_OBJ             = $(DTRACE_PROVIDER:%.d=$(OBJ32)/%.o)
     64 DTRACE32= $(DTRACE) -G -s src/$(DTRACE_PROVIDER) $(MODULE_OBJ_32) -o $(DTRACE_OBJ)
     65 
     66 COMMON_SRC	 = config.c
     67 COMMON_SRC	+= admintf.c
     68 COMMON_SRC	+= log.c
     69 COMMON_SRC	+= main.c
     70 COMMON_SRC	+= cache.c
     71 COMMON_SRC	+= htable.c
     72 COMMON_SRC	+= msgq.c
     73 COMMON_SRC	+= server.c
     74 COMMON_SRC	+= func.c
     75 COMMON_SRC	+= pdu.c
     76 COMMON_SRC	+= dump.c
     77 COMMON_SRC	+= obj.c
     78 COMMON_SRC	+= dd.c
     79 COMMON_SRC	+= qry.c
     80 COMMON_SRC	+= utils.c
     81 COMMON_SRC	+= door.c
     82 COMMON_SRC	+= dseng.c
     83 COMMON_SRC	+= dsapi.c
     84 COMMON_SRC	+= scn.c
     85 COMMON_SRC	+= sched.c
     86 COMMON_SRC	+= esi.c
     87 
     88 sparc_SRC	 =
     89 
     90 i386_SRC	 =
     91 
     92 MODULE_SRC	 = $(COMMON_SRC)
     93 MODULE_SRC	+= $($(MACH)_SRC)
     94 
     95 MODULE_OBJ_32    = $(MODULE_SRC:%.c=$(OBJ32)/%.o)
     96 MODULE_OBJ_64    = 
     97 
     98 BINARY32         = $(OBJ32)/$(MODULE)
     99 BINARY64         = 
    100 BINARIES         = $(BINARY32)
    101 
    102 COMMON_INCLUDES	+= -I/usr/include/libxml2
    103 COMMON_INCLUDES	+= -I$(OBJ32)
    104 
    105 sparc_INCLUDES	=
    106 i386_INCLUDES	= 
    107 
    108 LDLIBS		 = -lsecdb
    109 LDLIBS		+= -lsocket
    110 LDLIBS		+= -lnsl
    111 LDLIBS		+= -lintl
    112 LDLIBS		+= -lscf
    113 LDLIBS		+= -lxml2
    114 LDLIBS		+= -ldoor
    115 LDLIBS		+= -lrt
    116 
    117 LDLIBS32	 = -L$(ON_LIB_32)
    118 LDLIBS32	+= $(LDLIBS)
    119 
    120 LDLIBS64	 =
    121 
    122 LINT_TARGETS	= cmd_lint32
    123 
    124 # Handle creating our directories when needed
    125 DIRS += $(SEC_ATTRS)
    126 DIRS += $(LCMESSAGES)
    127 DIRS += $(APP_DATA)
    128 DIRS += $(SVC_MANIFEST)
    129 DIRS += $(USR_SBIN)
    130 
    131 
    132 ALLPREQ 	 = $(OBJ32)
    133 ALLPREQ 	+= .WAIT
    134 ALLPREQ		+= $(DTRACE_HEADER)
    135 ALLPREQ 	+= $(BINARIES)
    136 
    137 INSTALLPREQ	 = all
    138 INSTALLPREQ	+= .WAIT
    139 INSTALLPREQ	+= $(SEC_ATTRS)
    140 INSTALLPREQ	+= $(APP_DATA)
    141 INSTALLPREQ	+= $(SVC_MANIFEST)
    142 INSTALLPREQ	+= $(USR_SBIN)
    143 INSTALLPREQ	+= $(LCMESSAGES)
    144 INSTALLPREQ	+= .WAIT
    145 INSTALLPREQ	+= $(SEC_ATTRS)/auth_attr.isns
    146 INSTALLPREQ	+= $(SEC_ATTRS)/prof_attr.isns
    147 INSTALLPREQ	+= $(SVC_MANIFEST)/isns_server.xml
    148 INSTALLPREQ	+= $(USR_SBIN)/isns
    149 
    150 PKGPREQ		 = install
    151 PKGPREQ		+= .WAIT 
    152 PKGPREQ		+= $(PKG_PROJ_DEPENDS:%=%_installed)
    153 PKGPREQ         += $(PKGAREA)
    154 PKGPREQ		+= .WAIT
    155 PKGPREQ         += $(MODULE_PKGS:%=$(PKGAREA)/%)
    156 
    157 CLEANFILES	 = $(MODULE_OBJ_32) $(BINARY32)
    158 CLEANFILES	+= $(DTRACE_HEADER)
    159 CLEANFILES	+= $(DTRACE_OBJ)
    160 
    161 CLOBBERFILES	 = $(CLEANFILES) 
    162 CLOBBERFILES	+= $(MOD_LINT_LIB)
    163 CLOBBERFILES	+= $(POFILE)
    164 
    165 NUKEFILES	 = $(CLOBBERFILES)
    166 NUKEFILES  	+= $(SEC_ATTRS)/auth_attr.isns
    167 NUKEFILES  	+= $(SEC_ATTRS)/prof_attr.isns
    168 NUKEFILES  	+= $(SVC_MANIFEST)/isns_server.xml
    169 NUKEFILES	+= $(USR_SBIN)/isns
    170 NUKEFILES	+= $(MODULE_PKGS:%=$(PKGAREA)/%)
    171 
    172 # definitions for i18n
    173 POFILE= 	$(LIBRARY:%.a=%.po)
    174 MSGFILES=	`$(GREP) -l gettext src/*.[ch]`
    175 
    176 include ../Makefile.common
    177 
    178 $(USR_SBIN)/isns: $(BINARY32)
    179 	$(INSTALL) -s -m 0755 -f $(USR_SBIN) $(BINARY32)
    180 
    181 $(SVC_MANIFEST)/isns_server.xml: $(XML_DIR)/isns_server.xml
    182 	$(INSTALL) -s -m 0444 -f $(SVC_MANIFEST) $(XML_DIR)/isns_server.xml
    183 
    184 $(SEC_ATTRS)/auth_attr.isns: $(SRC_DIR)/auth_attr
    185 	$(RM) -f $(OBJ32)/auth_attr.isns
    186 	$(CP) $(SRC_DIR)/auth_attr $(OBJ32)/auth_attr.isns
    187 	$(INSTALL) -s -m 0644 -f $(SEC_ATTRS) $(OBJ32)/auth_attr.isns
    188 
    189 $(SEC_ATTRS)/prof_attr.isns: $(SRC_DIR)/prof_attr
    190 	$(RM) -f $(OBJ32)/prof_attr.isns
    191 	$(CP) $(SRC_DIR)/prof_attr $(OBJ32)/prof_attr.isns
    192 	$(INSTALL) -s -m 0644 -f $(SEC_ATTRS) $(OBJ32)/prof_attr.isns
    193 
    194 #
    195 # For source message catalogue
    196 #
    197 .SUFFIXES: $(SUFFIXES) .po
    198 MSGROOT= $(PROTO_ROOT)/catalog
    199 MSGDOMAIN= $(MSGROOT)/$(TEXT_DOMAIN)
    200 MSGDOMAINPOFILE = $(MSGDOMAIN)/$(POFILE)
    201 DCMSGDOMAIN= $(MSGROOT)/LC_TIME/$(TEXT_DOMAIN)
    202 DCMSGDOMAINPOFILE = $(DCMSGDOMAIN)/$(DCFILE:.dc=.po)
    203 
    204 XGETFLAGS= -c TRANSLATION_NOTE -p $(OBJ32)
    205 
    206 TEXT_DOMAIN= SUNW_OST_OSLIB
    207 POFILE= mpathadm.po
    208 POFILES= $(MODULE_SRC:%=src/%)
    209 
    210 .PARALLEL:	$(POFILES) $(MSGFILES)
    211 
    212 $(MSGDOMAIN) $(DCMSGDOMAIN):
    213 	$(INS.dir)
    214 
    215 $(DCMSGDOMAINPOFILE): $(DCMSGDOMAIN) $(DCFILE)
    216 	$(RM) $@; $(CP) $(DCFILE) $@
    217 
    218 BUILDPO.msgfiles = \
    219 	$(RM) $(OBJ32)/messages.po $(OBJ32)/$(TEXT_DOMAIN).po; \
    220 	$(TOUCH) $(OBJ32)/$(TEXT_DOMAIN).po; \
    221 	$(XGETTEXT) $(XGETFLAGS) $(MSGFILES); \
    222 	$(SED) -e '/^\# msgid/,/^\# msgstr/d' -e '/^domain/d' \
    223 		$(OBJ32)/messages.po $(OBJ32)/$(TEXT_DOMAIN).po > $(OBJ32)/$(POFILE); \
    224 	$(RM) $(OBJ32)/messages.po $(OBJ32)/$(TEXT_DOMAIN).po
    225 
    226 pofile_MSGFILES:
    227 	$(BUILDPO.msgfiles)
    228 
    229 _msg: pofile_MSGFILES
    230