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