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