xref: /titanic_52/usr/src/cmd/cmd-inet/usr.sbin/ipsecutils/Makefile (revision 7014882c6a3672fd0e5d60200af8643ae53c5928)
1e3320f40Smarkfen#
2e3320f40Smarkfen# CDDL HEADER START
3e3320f40Smarkfen#
4e3320f40Smarkfen# The contents of this file are subject to the terms of the
5e3320f40Smarkfen# Common Development and Distribution License (the "License").
6e3320f40Smarkfen# You may not use this file except in compliance with the License.
7e3320f40Smarkfen#
8e3320f40Smarkfen# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9e3320f40Smarkfen# or http://www.opensolaris.org/os/licensing.
10e3320f40Smarkfen# See the License for the specific language governing permissions
11e3320f40Smarkfen# and limitations under the License.
12e3320f40Smarkfen#
13e3320f40Smarkfen# When distributing Covered Code, include this CDDL HEADER in each
14e3320f40Smarkfen# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15e3320f40Smarkfen# If applicable, add the following below this CDDL HEADER, with the
16e3320f40Smarkfen# fields enclosed by brackets "[]" replaced with your own identifying
17e3320f40Smarkfen# information: Portions Copyright [yyyy] [name of copyright owner]
18e3320f40Smarkfen#
19e3320f40Smarkfen# CDDL HEADER END
20e3320f40Smarkfen#
21e3320f40Smarkfen#
223afe87ebSRoger A. Faulkner# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23e3320f40Smarkfen# Use is subject to license terms.
24e3320f40Smarkfen#
25e3320f40Smarkfen
26e3320f40SmarkfenPROG=		ikeadm ipsecalgs ipsecconf ipseckey ikecert
27e3320f40SmarkfenSOCKETPROG=	ipsecalgs ipsecconf ipseckey
285d3b8cb7SBill SommerfeldTSOLPROG=	ipseckey
29e3320f40SmarkfenSRCS=           ikeadm.c ipsecalgs.c ipsecconf.c ipseckey.c
30e3320f40Smarkfen
31e3320f40Smarkfeninclude ../../../Makefile.cmd
32e3320f40Smarkfen
33e3320f40SmarkfenMANIFEST=	ipsecalgs.xml policy.xml manual-key.xml
34e3320f40Smarkfen
35e3320f40SmarkfenROOTMANIFESTDIR=	$(ROOTSVCNETWORKIPSEC)
36e3320f40Smarkfen$(ROOTMANIFEST)		:= FILEMODE= 444
37e3320f40Smarkfeninclude ../../Makefile.cmd-inet
38e3320f40Smarkfen
39e3320f40SmarkfenCOMMONSRCS=	$(CMDINETCOMMONDIR)/$(COMMONOBJS:.o=.c)
40e3320f40SmarkfenSRCS+=		$(COMMONSRCS)
41e3320f40Smarkfen
42e3320f40Smarkfen#
43e3320f40Smarkfen# Message catalog
44e3320f40Smarkfen#
45e3320f40SmarkfenPOFILES=	ikeadm.po ipsecalgs.po ipsecconf.po ipseckey.po
46e3320f40SmarkfenPOFILE=		ipsecutils.po
47e3320f40Smarkfen
48e3320f40Smarkfenall:=		TARGET= all
49e3320f40Smarkfeninstall:=	TARGET= install
50e3320f40Smarkfenclean:=		TARGET= clean
51e3320f40Smarkfenclobber:=	TARGET= clobber
52e3320f40Smarkfenlint:=		TARGET= lint
53e3320f40Smarkfen
54e3320f40SmarkfenCLOBBERFILES +=	$(PROG) $(POFILES)
55e3320f40SmarkfenCLEANFILES += $(PROG) $(POFILES)
56e3320f40Smarkfen
57e3320f40SmarkfenCPPFLAGS +=     -DSYSV -DBSD_COMP -I$(CMDINETCOMMONDIR) -I.
58*7014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-parentheses
59*7014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-uninitialized
60*7014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-switch
61e3320f40Smarkfen
62e3320f40SmarkfenCFLAGS += $(XSTRCONST)
63e3320f40SmarkfenLDLIBS += -lipsecutil -lnsl
645d3b8cb7SBill Sommerfeld
655d3b8cb7SBill SommerfeldLAZYLIBS = $(ZLAZYLOAD) -ltsol $(ZNOLAZYLOAD)
665d3b8cb7SBill Sommerfeldlint := LAZYLIBS = -ltsol
675d3b8cb7SBill Sommerfeld
685d3b8cb7SBill Sommerfeld$(TSOLPROG)	:=	LDLIBS += $(LAZYLIBS)
69e3320f40Smarkfen$(SOCKETPROG)	:=      LDLIBS += -lsocket
70e3320f40Smarkfen
71e3320f40Smarkfen.KEEP_STATE:
72e3320f40Smarkfen
73e3320f40Smarkfen.PARALLEL:
74e3320f40Smarkfen
753afe87ebSRoger A. Faulkner.NO_PARALLEL:	$(CHKMANIFEST)
763afe87ebSRoger A. Faulkner
77e3320f40Smarkfenall: $(PROG)
78e3320f40Smarkfen
79e3320f40Smarkfen#
80e3320f40Smarkfen# message catalog
81e3320f40Smarkfen#
82e3320f40Smarkfen
83e3320f40Smarkfen$(POFILE): $(POFILES)
84e3320f40Smarkfen	$(RM) $@
85e3320f40Smarkfen	cat $(POFILES) >> $@
86e3320f40Smarkfen
87e3320f40Smarkfen$(COMMONOBJS): $(COMMONSRCS)
88e3320f40Smarkfen	$(COMPILE.c) $(COMMONSRCS)
89e3320f40Smarkfen
90e3320f40Smarkfen$(ROOTUSRSBINLINKS):
91e3320f40Smarkfen	-$(RM) $@; $(SYMLINK) ../../sbin/$(@F) $@
92e3320f40Smarkfen
93e3320f40Smarkfeninstall: $(PROG) $(ROOTFS_PROG) .WAIT $(ROOTUSRSBINPROG) \
94e3320f40Smarkfen	 $(ROOTUSRSBINLINKS) $(ROOTETCDEFAULTFILES) $(ROOTMANIFEST)
95e3320f40Smarkfen
96e3320f40Smarkfenlint:
97e3320f40Smarkfen	$(LINT.c) -erroff=E_NAME_USED_NOT_DEF2 \
98e3320f40Smarkfen	-erroff=E_NAME_MULTIPLY_DEF2 $(SRCS) $(LDLIBS)
99e3320f40Smarkfen
100e3320f40Smarkfencheck:	$(CHKMANIFEST)
101e3320f40Smarkfen
102e3320f40Smarkfenclean:
103e3320f40Smarkfen	-$(RM) $(CLEANFILES)
104e3320f40Smarkfen
105e3320f40Smarkfen
106e3320f40Smarkfeninclude ../../../Makefile.targ
107e3320f40Smarkfen
108