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.
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.
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]
23 # Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
24 # Copyright 2014 Garrett D'Amore <garrett@damore.org>
25 # Copyright (c) 2018, Joyent, Inc.
28 SYNCPROG
= syncinit syncloop syncstat
30 PROG
= 6to4relay arp if_mpadm \
31 in.comsat in.fingerd in.rarpd \
32 in.rwhod in.telnetd in.tftpd ipaddrsel \
35 MANIFEST
= rarp.xml telnet.xml comsat.xml finger.xml
36 SVCMETHOD
= svc-sockfilter
38 ROOTFS_PROG
= hostconfig route soconfig
39 SBINLINKS
= hostconfig route
41 RPCSVCPROG
= hostconfig
43 SOCKETPROG
= 6to4relay arp hostconfig if_mpadm in.comsat \
45 in.rwhod in.telnetd in.tftpd ipaddrsel ndp route
46 NSLPROG
= 6to4relay arp hostconfig in.comsat in.rarpd \
48 in.tftpd ipaddrsel ndp route
52 DEFAULTFILES
= telnetd.dfl
54 PROGSRCS
= $(PROG
:%=%.c
)
55 TFTPDOBJS
= in.tftpd.o tftpsubs.o
56 OTHERSRC
= ..
/usr.bin
/tftp
/tftpsubs.c
57 K5TELNETOBJS
= in.telnetd.o
58 SRCS
= $(PROGSRCS
) $(OTHERSRC
)
60 SUBDIRS
= ifconfig ilbadm in.rdisc in.routed \
61 in.talkd inetadm inetconv ipadm ipmpstat ipqosconf ipsecutils \
62 nwamadm nwamcfg ping \
63 snoop sppptun traceroute wificonfig
65 MSGSUBDIRS
= ifconfig ilbadm in.routed in.talkd \
66 inetadm inetconv ipadm ipmpstat ipqosconf ipsecutils \
67 nwamadm nwamcfg sppptun snoop wificonfig
69 include ..
/..
/Makefile.cmd
70 ROOTMANIFESTDIR
= $(ROOTSVCNETWORK
)
71 $(ROOTMANIFEST
) := FILEMODE
= 444
72 include ..
/Makefile.cmd-inet
74 ROOTSBINPROG
= $(ROOTFS_PROG
:%=$(ROOTSBIN
)/%)
75 ROOTUSRSBINLINKS
= $(SBINLINKS
:%=$(ROOTUSRSBIN
)/%)
77 CERRWARN
+= -Wno-uninitialized
78 CERRWARN
+= -Wno-unused-variable
79 CERRWARN
+= -Wno-unused-function
80 CERRWARN
+= -Wno-parentheses
81 CERRWARN
+= -Wno-char-subscripts
82 CERRWARN
+= -Wno-extra
83 CERRWARN
+= -Wno-address
85 # "missing type for func"
91 POFILES
= 6to4relay.po if_mpadm.po in.comsat.po ipaddrsel.po route.po \
96 install:= TARGET
= install
98 clobber:= TARGET
= clobber
101 CLOBBERFILES
+= $(ROOTFS_PROG
) $(PROG
)
102 CLEANFILES
+= $(TFTPDOBJS
) $(K5TELNETOBJS
)
104 CPPFLAGS
+= -DSYSV
-DBSD_COMP
-I
$(CMDINETCOMMONDIR
) -I
106 include $(SRC
)/lib
/gss_mechs
/mech_krb5
/Makefile.mech_krb5
109 $(SYNCPROG
) := LDLIBS
+= -ldlpi
110 $(PAMPROG
) := LDLIBS
+= -lpam
111 $(RPCSVCPROG
) := LDLIBS
+= -lrpcsvc
112 $(K5PROGS
) := LDFLAGS
+= $(KRUNPATH
) \
113 -L
$(ROOT
)$(KLIBDIR_DO
) -L
$(ROOT
)$(KLIBDIR_GL
)
114 $(K5PROGS
) := K5LIBS
= -lmech_krb5
115 $(K5PROGS
) := CPPFLAGS
+= -I
$(SRCTOP
)/include \
116 -I
$(SRC
)/uts
/common
/ \
117 -I
$(SRC
)/uts
/common
/gssapi
/mechs
/krb5
/include \
118 -I
$(SRC
)/lib
/gss_mechs
/mech_krb5
/include \
119 -I
$(SRC
)/lib
/pam_modules
/krb5
121 $(DLADMPROG
) := LDLIBS
+= -ldladm
123 in.rarpd
:= LDLIBS
+= -linetutil
-ldlpi
124 if_mpadm
:= LDLIBS
+= -linetutil
-lipmp
125 if_mpadm.po
:= XGETFLAGS
+= -a
126 route
:= CPPFLAGS
+= -DNDEBUG
127 in.comsat
:= LDFLAGS
+= $(MAPFILE.NGB
:%=-Wl
,-M
%)
133 all: $(PROG
) $(ROOTFS_PROG
) $(SUBDIRS
) THIRDPARTYLICENSE.arp
138 _msg
: $(MSGSUBDIRS
) $(POFILE
)
140 syncutil
: $(SYNCPROG
)
142 $(POFILE
): $(POFILES
)
146 %.o
: $(CMDINETCOMMONDIR
)/%.c
147 $(COMPILE.c
) -o
$@
$<
149 in.telnetd
: $(K5TELNETOBJS
)
150 $(LINK.c
) $(K5TELNETOBJS
) -o
$@
$(LDLIBS
)
153 in.tftpd
: $(TFTPDOBJS
)
154 $(LINK.c
) $(TFTPDOBJS
) -o
$@
$(LDLIBS
)
157 tftpsubs.o
: $(OTHERSRC
)
158 $(COMPILE.c
) $(OTHERSRC
) -o
$@
162 -$(RM
) $@
; $(SYMLINK
) ..
/..
/sbin
/$(@F
) $@
164 install: $(PROG
) $(ROOTFS_PROG
) $(SUBDIRS
) .WAIT
$(ROOTUSRSBINPROG
) \
165 $(ROOTSBINPROG
) $(ROOTUSRSBINLINKS
) $(ROOTETCDEFAULTFILES
) \
166 $(ROOTMANIFEST
) $(ROOTSVCMETHOD
) THIRDPARTYLICENSE.arp
168 THIRDPARTYLICENSE.arp
: arp.c
169 $(SED
) -n
'/University of California/,/SUCH DAMAGE/p' arp.c
> $@
171 CLOBBERFILES
+= THIRDPARTYLICENSE.arp
174 # The reason this rule checks for the existence of the
175 # Makefile is that some of the directories do not exist
176 # in our exportable source builds.
179 @if
[ -f
$@
/Makefile
]; then \
180 cd
$@
; pwd
; $(MAKE
) $(TARGET
); \
187 check: $(CHKMANIFEST
)
189 clean: $(SUBDIRS
) clean_local
193 clobber: $(SUBDIRS
) clobber_local
194 clobber_local
: clean_local
195 $(RM
) $(CLOBBERFILES
)