Home | History | Annotate | Download | only in isnsadm
      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/23 SMI"
     26 #
     27 # src/sun_nws/isnsadm/Makefile
     28 #
     29 
     30 include ../Makefile.config
     31 include ../Makefile.cmds
     32   
     33 BUILD64		 = $(POUND_SIGN)
     34 
     35 MODULE  	 = isnsadm
     36 
     37 STAGING32	 = $(PROTO_ROOT)/usr/sbin
     38 
     39 CPPFLAGS32	+= $(DTEXTDOM)
     40 
     41 MODULE_PKGS	 = SUNWisnsadm
     42 
     43 MODULE_SRC	 = isnsadm.c isnsadm_msg.c cmdparse.c
     44 
     45 MODULE_OBJ_32    = $(MODULE_SRC:%.c=$(OBJ32)/%.o)
     46 MODULE_OBJ_32	+= $(COMMON_SRC:$(COMMON_DIR)/%.c=$(OBJ32)/%.o)
     47 
     48 BINARY32         = $(OBJ32)/$(MODULE)
     49 BINARIES         = $(BINARY32)
     50 
     51 COMMON_INCLUDES	+= -I$(MOD_INC_ISNS)
     52 COMMON_INCLUDES	+= -I/usr/include/libxml2
     53 
     54 LDLIBS           =  -lxml2
     55 LDLIBS          +=  -ldoor
     56 LDLIBS          +=  -lscf
     57 LDLIBS          +=  -lc
     58 
     59 LDLIBS32	 = -L$(ON_LIB_32)
     60 LDLIBS32	+= $(LDLIBS)
     61 
     62 LDLIBS64	 =
     63 
     64 LINT_TARGETS	= cmd_lint32
     65 
     66 # Handle creating our directories when needed
     67 DIRS += $(LCMESSAGES)
     68 
     69 ALLPREQ 	+= $(OBJ32)
     70 ALLPREQ		+= .WAIT
     71 ALLPREQ 	+= $(BINARIES)
     72 
     73 INSTALLPREQ	 = all
     74 INSTALLPREQ	+= .WAIT
     75 INSTALLPREQ	+= $(STAGING32)
     76 INSTALLPREQ     += $(LCMESSAGES)
     77 INSTALLPREQ	+= .WAIT
     78 INSTALLPREQ	+= $(STAGING32)/$(MODULE)
     79 INSTALLPREQ	+= _msg
     80 
     81 PKGPREQ		 = install
     82 PKHREQ		+= .WAIT
     83 PKGPREQ         += $(PKGAREA)
     84 PKGPREQ		+= .WAIT 
     85 PKGPREQ         += $(MODULE_PKGS:%=$(PKGAREA)/%)
     86 
     87 CLEANFILES     = $(MODULE_OBJ_32)
     88 CLEANFILES    += $(BINARY32)
     89 
     90 CLOBBERFILES   = $(CLEANFILES)
     91 CLOBBERFILES += $(MOD_LINT_LIB)
     92 CLOBBERFILES += $(POFILE)
     93 
     94 NUKEFILES      = $(CLOBBERFILES)
     95 NUKEFILES     += $(STAGING32)/$(MODULE)
     96 NUKEFILES     += $(MODULE_PKGS:%=$(PKGAREA)/%)
     97 
     98 MSGFILES=	`$(GREP) -l gettext src/*.[ch]`
     99 
    100 include ../Makefile.common
    101 #
    102 # For source message catalogue
    103 #
    104 .SUFFIXES: $(SUFFIXES) .po
    105 MSGROOT= $(PROTO_ROOT)/catalog
    106 MSGDOMAIN= $(MSGROOT)/$(TEXT_DOMAIN)
    107 MSGDOMAINPOFILE = $(MSGDOMAIN)/$(POFILE)
    108 DCMSGDOMAIN= $(MSGROOT)/LC_TIME/$(TEXT_DOMAIN) 
    109 DCMSGDOMAINPOFILE = $(DCMSGDOMAIN)/$(DCFILE:.dc=.po)
    110 
    111 XGETFLAGS= -c TRANSLATION_NOTE -p $(OBJ32)
    112 
    113 TEXT_DOMAIN= SUNW_OST_OSLIB
    114 POFILE= isnsadm.po
    115 POFILES= $(MODULE_SRC:%=src/%)
    116 
    117 .PARALLEL:	$(POFILES) $(MSGFILES)
    118 
    119 $(MSGDOMAIN) $(DCMSGDOMAIN):
    120 	$(INS.dir)
    121 
    122 $(DCMSGDOMAINPOFILE): $(DCMSGDOMAIN) $(DCFILE)
    123 	$(RM) $@; $(CP) $(DCFILE) $@
    124 
    125 BUILDPO.msgfiles = \
    126 	$(RM) $(OBJ32)/messages.po $(OBJ32)/$(TEXT_DOMAIN).po; \
    127 	$(TOUCH) $(OBJ32)/$(TEXT_DOMAIN).po; \
    128 	$(XGETTEXT) $(XGETFLAGS) $(MSGFILES); \
    129 	$(SED) -e '/^\# msgid/,/^\# msgstr/d' -e '/^domain/d' \
    130 		$(OBJ32)/messages.po $(OBJ32)/$(TEXT_DOMAIN).po > $(OBJ32)/$(POFILE); \
    131 	$(RM) $(OBJ32)/messages.po $(OBJ32)/$(TEXT_DOMAIN).po
    132 
    133 pofile_MSGFILES:
    134 	$(BUILDPO.msgfiles)
    135 
    136 _msg: pofile_MSGFILES
    137