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>
27 SYNCPROG
= syncinit syncloop syncstat
29 PROG
= 6to4relay arp if_mpadm \
30 in.comsat in.fingerd in.rarpd \
31 in.rwhod in.telnetd in.tftpd ipaddrsel \
34 MANIFEST
= rarp.xml telnet.xml comsat.xml finger.xml
35 SVCMETHOD
= svc-sockfilter
37 ROOTFS_PROG
= hostconfig route soconfig
38 SBINLINKS
= hostconfig route
40 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-implicit-function-declaration
78 CERRWARN
+= -Wno-uninitialized
79 CERRWARN
+= -Wno-unused-variable
80 CERRWARN
+= -Wno-unused-function
81 CERRWARN
+= -Wno-parentheses
82 CERRWARN
+= -Wno-char-subscripts
83 CERRWARN
+= -Wno-extra
84 CERRWARN
+= -Wno-address
89 POFILES
= 6to4relay.po if_mpadm.po in.comsat.po ipaddrsel.po route.po \
94 install:= TARGET
= install
96 clobber:= TARGET
= clobber
99 CLOBBERFILES
+= $(ROOTFS_PROG
) $(PROG
)
100 CLEANFILES
+= $(TFTPDOBJS
) $(K5TELNETOBJS
)
102 CPPFLAGS
+= -DSYSV
-DBSD_COMP
-I
$(CMDINETCOMMONDIR
) -I
104 include $(SRC
)/lib
/gss_mechs
/mech_krb5
/Makefile.mech_krb5
107 $(SYNCPROG
) := LDLIBS
+= -ldlpi
108 $(AUDITPROG
) := LDLIBS
+= -lbsm
109 $(PAMPROG
) := LDLIBS
+= -lpam
110 $(RPCSVCPROG
) := LDLIBS
+= -lrpcsvc
111 $(K5PROGS
) := LDFLAGS
+= $(KRUNPATH
) \
112 -L
$(ROOT
)$(KLIBDIR_DO
) -L
$(ROOT
)$(KLIBDIR_GL
)
113 $(K5PROGS
) := K5LIBS
= -lmech_krb5
114 $(K5PROGS
) := CPPFLAGS
+= -I
$(SRCTOP
)/include \
115 -I
$(SRC
)/uts
/common
/ \
116 -I
$(SRC
)/uts
/common
/gssapi
/mechs
/krb5
/include \
117 -I
$(SRC
)/lib
/gss_mechs
/mech_krb5
/include \
118 -I
$(SRC
)/lib
/pam_modules
/krb5
120 $(DLADMPROG
) := LDLIBS
+= -ldladm
122 in.rarpd
:= LDLIBS
+= -linetutil
-ldlpi
123 if_mpadm
:= LDLIBS
+= -linetutil
-lipmp
124 if_mpadm.po
:= XGETFLAGS
+= -a
125 route
:= CPPFLAGS
+= -DNDEBUG
126 in.comsat
:= LDFLAGS
+= $(MAPFILE.NGB
:%=-Wl
,-M
%)
132 all: $(PROG
) $(ROOTFS_PROG
) $(SUBDIRS
) THIRDPARTYLICENSE.arp
137 _msg
: $(MSGSUBDIRS
) $(POFILE
)
139 syncutil
: $(SYNCPROG
)
141 $(POFILE
): $(POFILES
)
145 %.o
: $(CMDINETCOMMONDIR
)/%.c
146 $(COMPILE.c
) -o
$@
$<
148 in.telnetd
: $(K5TELNETOBJS
)
149 $(LINK.c
) $(K5TELNETOBJS
) -o
$@
$(LDLIBS
)
152 in.tftpd
: $(TFTPDOBJS
)
153 $(LINK.c
) $(TFTPDOBJS
) -o
$@
$(LDLIBS
)
156 tftpsubs.o
: $(OTHERSRC
)
157 $(COMPILE.c
) $(OTHERSRC
) -o
$@
161 -$(RM
) $@
; $(SYMLINK
) ..
/..
/sbin
/$(@F
) $@
163 install: $(PROG
) $(ROOTFS_PROG
) $(SUBDIRS
) .WAIT
$(ROOTUSRSBINPROG
) \
164 $(ROOTSBINPROG
) $(ROOTUSRSBINLINKS
) $(ROOTETCDEFAULTFILES
) \
165 $(ROOTMANIFEST
) $(ROOTSVCMETHOD
) THIRDPARTYLICENSE.arp
167 THIRDPARTYLICENSE.arp
: arp.c
168 $(SED
) -n
'/University of California/,/SUCH DAMAGE/p' arp.c
> $@
170 CLOBBERFILES
+= THIRDPARTYLICENSE.arp
173 # The reason this rule checks for the existence of the
174 # Makefile is that some of the directories do not exist
175 # in our exportable source builds.
178 @if
[ -f
$@
/Makefile
]; then \
179 cd
$@
; pwd
; $(MAKE
) $(TARGET
); \
186 check: $(CHKMANIFEST
)
188 clean: $(SUBDIRS
) clean_local
192 clobber: $(SUBDIRS
) clobber_local
193 clobber_local
: clean_local
194 $(RM
) $(CLOBBERFILES
)