xref: /illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/ipsecutils/Makefile (revision 1edba515a3484e0f74b638b203d462b3112ac84d)
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#
255661bb76SJohn Levon# Copyright (c) 2018, Joyent, Inc.
26*1edba515SAndy Fiddaman# Copyright 2024 Oxide Computer Company
27e3320f40Smarkfen
28e3320f40SmarkfenPROG=		ikeadm ipsecalgs ipsecconf ipseckey ikecert
29e3320f40SmarkfenSOCKETPROG=	ipsecalgs ipsecconf ipseckey
305d3b8cb7SBill SommerfeldTSOLPROG=	ipseckey
31e3320f40SmarkfenSRCS=		ikeadm.c ipsecalgs.c ipsecconf.c ipseckey.c
32*1edba515SAndy FiddamanSBINLINKS=	tcpkey
33e3320f40Smarkfen
34e3320f40Smarkfeninclude ../../../Makefile.cmd
35e3320f40Smarkfen
36*1edba515SAndy FiddamanMANIFEST=	ipsecalgs.xml policy.xml manual-key.xml tcpkey.xml
37*1edba515SAndy FiddamanSVCMETHOD=	net-tcpkey
38e3320f40Smarkfen
39e3320f40SmarkfenROOTMANIFESTDIR=	$(ROOTSVCNETWORKIPSEC)
40e3320f40Smarkfen$(ROOTMANIFEST)		:= FILEMODE= 444
41e3320f40Smarkfeninclude ../../Makefile.cmd-inet
42e3320f40Smarkfen
43*1edba515SAndy FiddamanROOTUSRSBINLINKS = $(SBINLINKS:%=$(ROOTUSRSBIN)/%)
44*1edba515SAndy Fiddaman$(ROOTUSRSBIN)/tcpkey := INSLINKTARGET = $(ROOTUSRSBIN)/ipseckey
45*1edba515SAndy Fiddaman
46e3320f40SmarkfenCOMMONSRCS=	$(CMDINETCOMMONDIR)/$(COMMONOBJS:.o=.c)
47e3320f40SmarkfenSRCS+=		$(COMMONSRCS)
48e3320f40Smarkfen
49e3320f40Smarkfen#
50e3320f40Smarkfen# Message catalog
51e3320f40Smarkfen#
52e3320f40SmarkfenPOFILES=	ikeadm.po ipsecalgs.po ipsecconf.po ipseckey.po
53e3320f40SmarkfenPOFILE=		ipsecutils.po
54e3320f40Smarkfen
55e3320f40Smarkfenall:=		TARGET= all
56e3320f40Smarkfeninstall:=	TARGET= install
57e3320f40Smarkfenclean:=		TARGET= clean
58e3320f40Smarkfenclobber:=	TARGET= clobber
59e3320f40Smarkfen
60e3320f40SmarkfenCLOBBERFILES +=	$(PROG) $(POFILES)
61e3320f40SmarkfenCLEANFILES += $(PROG) $(POFILES)
62e3320f40Smarkfen
63e3320f40SmarkfenCPPFLAGS +=	-DSYSV -DBSD_COMP -I$(CMDINETCOMMONDIR) -I.
647014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-parentheses
65d3b5f563SJohn LevonCERRWARN +=	$(CNOWARN_UNINIT)
667014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-switch
67e3320f40Smarkfen
685661bb76SJohn Levon# not linted
695661bb76SJohn LevonSMATCH=off
705661bb76SJohn Levon
71e3320f40SmarkfenLDLIBS += -lipsecutil -lnsl
725d3b8cb7SBill Sommerfeld
735d3b8cb7SBill SommerfeldLAZYLIBS = $(ZLAZYLOAD) -ltsol $(ZNOLAZYLOAD)
745d3b8cb7SBill Sommerfeld
755d3b8cb7SBill Sommerfeld$(TSOLPROG)	:=	LDLIBS += $(LAZYLIBS)
76e3320f40Smarkfen$(SOCKETPROG)	:=	LDLIBS += -lsocket
77e3320f40Smarkfen
78e3320f40Smarkfen.KEEP_STATE:
79e3320f40Smarkfen
80e3320f40Smarkfen.PARALLEL:
81e3320f40Smarkfen
823afe87ebSRoger A. Faulkner.NO_PARALLEL:	$(CHKMANIFEST)
833afe87ebSRoger A. Faulkner
84e3320f40Smarkfenall: $(PROG)
85e3320f40Smarkfen
86e3320f40Smarkfen#
87e3320f40Smarkfen# message catalog
88e3320f40Smarkfen#
89e3320f40Smarkfen
90e3320f40Smarkfen$(POFILE): $(POFILES)
91e3320f40Smarkfen	$(RM) $@
92e3320f40Smarkfen	cat $(POFILES) >> $@
93e3320f40Smarkfen
94e3320f40Smarkfen$(COMMONOBJS): $(COMMONSRCS)
95e3320f40Smarkfen	$(COMPILE.c) $(COMMONSRCS)
96e3320f40Smarkfen
97*1edba515SAndy Fiddaman$(ROOTUSRSBINLINKS): $(ROOTUSRSBINPROG)
98*1edba515SAndy Fiddaman	$(INS.link)
99e3320f40Smarkfen
100e3320f40Smarkfeninstall: $(PROG) $(ROOTFS_PROG) .WAIT $(ROOTUSRSBINPROG) \
101*1edba515SAndy Fiddaman	 $(ROOTUSRSBINLINKS) $(ROOTETCDEFAULTFILES) $(ROOTMANIFEST) \
102*1edba515SAndy Fiddaman	 $(ROOTSVCMETHOD) $(ROOTUSRSBINLINKS)
103e3320f40Smarkfen
104e3320f40Smarkfencheck:	$(CHKMANIFEST)
105e3320f40Smarkfen
106e3320f40Smarkfenclean:
107e3320f40Smarkfen	-$(RM) $(CLEANFILES)
108e3320f40Smarkfen
109e3320f40Smarkfen
110e3320f40Smarkfeninclude ../../../Makefile.targ
111