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 2007 Sun Microsystems, Inc. All rights reserved. 23 # Use is subject to license terms. 24 # 25 #ident "@(#)Makefile 1.1 07/09/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 -lsocket -lnsl -lintl -lscf -lxml2 -ldoor -lrt 109 110 LINT_TARGETS = cmd_lint32 111 112 # Handle creating our directories when needed 113 DIRS += $(SEC_ATTRS) 114 DIRS += $(LCMESSAGES) 115 DIRS += $(APP_DATA) 116 DIRS += $(SVC_MANIFEST) 117 DIRS += $(USR_SBIN) 118 119 120 ALLPREQ = $(OBJ32) 121 ALLPREQ += .WAIT 122 ALLPREQ += $(DTRACE_HEADER) 123 ALLPREQ += $(BINARIES) 124 125 INSTALLPREQ = all 126 INSTALLPREQ += .WAIT 127 INSTALLPREQ += $(SEC_ATTRS) 128 INSTALLPREQ += $(APP_DATA) 129 INSTALLPREQ += $(SVC_MANIFEST) 130 INSTALLPREQ += $(USR_SBIN) 131 INSTALLPREQ += $(LCMESSAGES) 132 INSTALLPREQ += .WAIT 133 INSTALLPREQ += $(SEC_ATTRS)/auth_attr.isns 134 INSTALLPREQ += $(SEC_ATTRS)/prof_attr.isns 135 INSTALLPREQ += $(SVC_MANIFEST)/isns_server.xml 136 INSTALLPREQ += $(USR_SBIN)/isns 137 138 PKGPREQ = install 139 PKGPREQ += .WAIT 140 PKGPREQ += $(PKG_PROJ_DEPENDS:%=%_installed) 141 PKGPREQ += $(PKGAREA) 142 PKGPREQ += .WAIT 143 PKGPREQ += $(MODULE_PKGS:%=$(PKGAREA)/%) 144 145 CLEANFILES = $(MODULE_OBJ_32) $(BINARY32) 146 CLEANFILES += $(DTRACE_HEADER) 147 CLEANFILES += $(DTRACE_OBJ) 148 149 CLOBBERFILES = $(CLEANFILES) 150 CLOBBERFILES += $(MOD_LINT_LIB) 151 CLOBBERFILES += $(POFILE) 152 153 NUKEFILES = $(CLOBBERFILES) 154 NUKEFILES += $(SEC_ATTRS)/auth_attr.isns 155 NUKEFILES += $(SEC_ATTRS)/prof_attr.isns 156 NUKEFILES += $(SVC_MANIFEST)/isns_server.xml 157 NUKEFILES += $(USR_SBIN)/isns 158 NUKEFILES += $(MODULE_PKGS:%=$(PKGAREA)/%) 159 160 # definitions for i18n 161 POFILE= $(LIBRARY:%.a=%.po) 162 MSGFILES= `$(GREP) -l gettext src/*.[ch]` 163 164 include ../Makefile.common 165 166 $(USR_SBIN)/isns: $(BINARY32) 167 $(INSTALL) -s -m 0755 -f $(USR_SBIN) $(BINARY32) 168 169 $(SVC_MANIFEST)/isns_server.xml: $(XML_DIR)/isns_server.xml 170 $(INSTALL) -s -m 0444 -f $(SVC_MANIFEST) $(XML_DIR)/isns_server.xml 171 172 $(SEC_ATTRS)/auth_attr.isns: $(SRC_DIR)/auth_attr 173 $(RM) -f $(OBJ32)/auth_attr.isns 174 $(CP) $(SRC_DIR)/auth_attr $(OBJ32)/auth_attr.isns 175 $(INSTALL) -s -m 0644 -f $(SEC_ATTRS) $(OBJ32)/auth_attr.isns 176 177 $(SEC_ATTRS)/prof_attr.isns: $(SRC_DIR)/prof_attr 178 $(RM) -f $(OBJ32)/prof_attr.isns 179 $(CP) $(SRC_DIR)/prof_attr $(OBJ32)/prof_attr.isns 180 $(INSTALL) -s -m 0644 -f $(SEC_ATTRS) $(OBJ32)/prof_attr.isns 181 182 # 183 # For source message catalogue 184 # 185 .SUFFIXES: $(SUFFIXES) .po 186 MSGROOT= $(PROTO_ROOT)/catalog 187 MSGDOMAIN= $(MSGROOT)/$(TEXT_DOMAIN) 188 MSGDOMAINPOFILE = $(MSGDOMAIN)/$(POFILE) 189 DCMSGDOMAIN= $(MSGROOT)/LC_TIME/$(TEXT_DOMAIN) 190 DCMSGDOMAINPOFILE = $(DCMSGDOMAIN)/$(DCFILE:.dc=.po) 191 192 XGETFLAGS= -c TRANSLATION_NOTE -p $(OBJ32) 193 194 TEXT_DOMAIN= SUNW_OST_OSLIB 195 POFILE= mpathadm.po 196 POFILES= $(MODULE_SRC:%=src/%) 197 198 .PARALLEL: $(POFILES) $(MSGFILES) 199 200 $(MSGDOMAIN) $(DCMSGDOMAIN): 201 $(INS.dir) 202 203 $(DCMSGDOMAINPOFILE): $(DCMSGDOMAIN) $(DCFILE) 204 $(RM) $@; $(CP) $(DCFILE) $@ 205 206 BUILDPO.msgfiles = \ 207 $(RM) $(OBJ32)/messages.po $(OBJ32)/$(TEXT_DOMAIN).po; \ 208 $(TOUCH) $(OBJ32)/$(TEXT_DOMAIN).po; \ 209 $(XGETTEXT) $(XGETFLAGS) $(MSGFILES); \ 210 $(SED) -e '/^\# msgid/,/^\# msgstr/d' -e '/^domain/d' \ 211 $(OBJ32)/messages.po $(OBJ32)/$(TEXT_DOMAIN).po > $(OBJ32)/$(POFILE); \ 212 $(RM) $(OBJ32)/messages.po $(OBJ32)/$(TEXT_DOMAIN).po 213 214 pofile_MSGFILES: 215 $(BUILDPO.msgfiles) 216 217 _msg: pofile_MSGFILES 218