xref: /illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/ipsecutils/Makefile (revision 275c9da86e89f8abf71135cf63d9fc23671b2e60)
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 usr/src/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 usr/src/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#
23#
24# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
25# Use is subject to license terms.
26#
27# ident	"%Z%%M%	%I%	%E% SMI"
28#
29
30PROG=		ikeadm ipsecalgs ipsecconf ipseckey ikecert
31SOCKETPROG=	ipsecalgs ipsecconf ipseckey
32SRCS=           ikeadm.c ipsecalgs.c ipsecconf.c ipseckey.c
33
34include ../../../Makefile.cmd
35
36MANIFEST=	ipsecalgs.xml policy.xml manual-key.xml
37
38ROOTMANIFESTDIR=	$(ROOTSVCNETWORKIPSEC)
39$(ROOTMANIFEST)		:= FILEMODE= 444
40include ../../Makefile.cmd-inet
41
42COMMONSRCS=	$(CMDINETCOMMONDIR)/$(COMMONOBJS:.o=.c)
43SRCS+=		$(COMMONSRCS)
44
45#
46# Message catalog
47#
48POFILES=	ikeadm.po ipsecalgs.po ipsecconf.po ipseckey.po
49POFILE=		ipsecutils.po
50
51all:=		TARGET= all
52install:=	TARGET= install
53clean:=		TARGET= clean
54clobber:=	TARGET= clobber
55lint:=		TARGET= lint
56
57CLOBBERFILES +=	$(PROG) $(POFILES)
58CLEANFILES += $(PROG) $(POFILES)
59
60CPPFLAGS +=     -DSYSV -DBSD_COMP -I$(CMDINETCOMMONDIR) -I.
61
62CFLAGS += $(XSTRCONST)
63LDLIBS += -lipsecutil -lnsl
64$(SOCKETPROG)	:=      LDLIBS += -lsocket
65
66.KEEP_STATE:
67
68.PARALLEL:
69
70all: $(PROG)
71
72#
73# message catalog
74#
75
76$(POFILE): $(POFILES)
77	$(RM) $@
78	cat $(POFILES) >> $@
79
80$(COMMONOBJS): $(COMMONSRCS)
81	$(COMPILE.c) $(COMMONSRCS)
82
83$(ROOTUSRSBINLINKS):
84	-$(RM) $@; $(SYMLINK) ../../sbin/$(@F) $@
85
86install: $(PROG) $(ROOTFS_PROG) .WAIT $(ROOTUSRSBINPROG) \
87	 $(ROOTUSRSBINLINKS) $(ROOTETCDEFAULTFILES) $(ROOTMANIFEST)
88
89lint:
90	$(LINT.c) -erroff=E_NAME_USED_NOT_DEF2 \
91	-erroff=E_NAME_MULTIPLY_DEF2 $(SRCS) $(LDLIBS)
92
93check:	$(CHKMANIFEST)
94
95clean:
96	-$(RM) $(CLEANFILES)
97
98
99include ../../../Makefile.targ
100
101