Home | History | Annotate | Download | only in stmfsvc
      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/stmfsvc/Makefile
     28 #
     29 
     30 include ../Makefile.config
     31 include ../Makefile.cmds
     32 
     33 BUILD64	= $(POUND_SIGN)
     34 
     35 MODULE  	 = svc-stmf
     36 
     37 STAGING32	 = $(PROTO_ROOT)/lib/svc/method
     38 STAGING64	 =
     39 
     40 CPPFLAGS32	+= $(DTEXTDOM)
     41 CFLAGS32        += -DSOLARIS
     42 CFLAGS64        += -DSOLARIS
     43 
     44 MODULE_SRC	 =  stmfsvc.c
     45 COMMON_SRC      += $(COM_SRC_CMDPARSE)/cmdparse.c
     46 SVC_METHOD	 = $(PROTO_ROOT)/lib/svc/method
     47 
     48 MODULE_OBJ_32    = $(MODULE_SRC:%.c=$(OBJ32)/%.o)
     49 MODULE_OBJ_32   += $(COMMON_SRC:$(COM_SRC_CMDPARSE)/%.c=$(OBJ32)/%.o)
     50 MODULE_OBJ_64    =
     51 
     52 BINARY32         = $(OBJ32)/$(MODULE)
     53 BINARY64         =
     54 BINARIES         = $(BINARY32) $(BINARY64)
     55 
     56 COMMON_INCLUDES	+= -I$(MOD_INC_LIBSTMF)
     57 COMMON_INCLUDES	+= -I$(MOD_INC_CMDPARSE)
     58 
     59 sparc_INCLUDES	 =
     60 i386_INCLUDES	 =
     61 
     62 sparc_LDLIBS	 = -lstmf
     63 i386_LDLIBS	 = -lstmf
     64 LDLIBS		+= $($(MACH)_LDLIBS)
     65 
     66 LDLIBS32	 = -L$(LIBSTMF_32)
     67 LDLIBS32	+= $(LDLIBS)
     68 
     69 LDLIBS64	 =
     70 
     71 LINT_TARGETS	 = cmd_lint32
     72 LFLAGS32        += -DSOLARIS
     73 LFLAGS64        += -DSOLARIS
     74 
     75 # Handle creating our directories when needed
     76 DIRS += $(LCMESSAGES)
     77 
     78 ALLPREQ 	 = $(PROJ_DEPENDS)
     79 ALLPREQ 	+= $(OBJ32)
     80 ALLPREQ 	+= .WAIT
     81 ALLPREQ 	+= $(BINARIES)
     82 
     83 INSTALLPREQ	 = all
     84 INSTALLPREQ	+= .WAIT
     85 INSTALLPREQ	+= $(STAGING32)
     86 INSTALLPREQ	+= $(LCMESSAGES)
     87 INSTALLPREQ	+= .WAIT
     88 INSTALLPREQ	+= $(STAGING32)/$(MODULE)
     89 INSTALLPREQ	+= _msg
     90 
     91 PKGPREQ		 = install
     92 PKGPREQ         += $(PKGAREA)
     93 PKGPREQ		+= .WAIT
     94 PKGPREQ         += $(MODULE_PKGS:%=$(PKGAREA)/%)
     95 
     96 CLEANFILES       = $(MODULE_OBJ_32)
     97 CLEANFILES      += $(BINARY32)
     98 
     99 CLOBBERFILES     = $(CLEANFILES)
    100 CLOBBERFILES    += $(MOD_LINT_LIB)
    101 CLOBBERFILES    += $(POFILE)
    102 
    103 NUKEFILES        = $(CLOBBERFILES)
    104 NUKEFILES       += $(STAGING32)/$(MODULE)
    105 NUKEFILES       += $(MODULE_PKGS:%=$(PKGAREA)/%)
    106 
    107 # definitions for i18n
    108 POFILE= 	$(LIBRARY:%.a=%.po)
    109 MSGFILES=	`$(GREP) -l gettext src/*.[ch]`
    110 
    111 include ../Makefile.common
    112 #
    113 # For source message catalogue
    114 #
    115 .SUFFIXES: $(SUFFIXES) .po
    116 MSGROOT= $(PROTO_ROOT)/catalog
    117 MSGDOMAIN= $(MSGROOT)/$(TEXT_DOMAIN)
    118 MSGDOMAINPOFILE = $(MSGDOMAIN)/$(POFILE)
    119 DCMSGDOMAIN= $(MSGROOT)/LC_TIME/$(TEXT_DOMAIN)
    120 DCMSGDOMAINPOFILE = $(DCMSGDOMAIN)/$(DCFILE:.dc=.po)
    121 
    122 XGETFLAGS= -c TRANSLATION_NOTE -p $(OBJ32)
    123 
    124 TEXT_DOMAIN= SUNW_OST_OSLIB
    125 POFILE= stmfadm.po
    126 POFILES= $(MODULE_SRC:%=src/%)
    127 
    128 .PARALLEL:	$(POFILES) $(MSGFILES)
    129 
    130 $(MSGDOMAIN) $(DCMSGDOMAIN):
    131 	$(INS.dir)
    132 
    133 $(DCMSGDOMAINPOFILE): $(DCMSGDOMAIN) $(DCFILE)
    134 	$(RM) $@; $(CP) $(DCFILE) $@
    135 
    136 BUILDPO.msgfiles = \
    137 	$(RM) $(OBJ32)/messages.po $(OBJ32)/$(TEXT_DOMAIN).po; \
    138 	$(TOUCH) $(OBJ32)/$(TEXT_DOMAIN).po; \
    139 	$(XGETTEXT) $(XGETFLAGS) $(MSGFILES); \
    140 	$(SED) -e '/^\# msgid/,/^\# msgstr/d' -e '/^domain/d' \
    141 		$(OBJ32)/messages.po $(OBJ32)/$(TEXT_DOMAIN).po > $(OBJ32)/$(POFILE); \
    142 	$(RM) $(OBJ32)/messages.po $(OBJ32)/$(TEXT_DOMAIN).po
    143 
    144 pofile_MSGFILES:
    145 	$(BUILDPO.msgfiles)
    146 
    147 _msg: pofile_MSGFILES
    148 
    149 $(SVC_METHOD)/stmf.xml: $(XML_DIR)/stmf.xml
    150 	$(INSTALL) -s -m 0444 -f $(SVC_MANIFEST) $(XML_DIR)/stmf.xml
    151 
    152