Makefile revision e7df7762bfed06e996cc80f583cbee2d8ed81d69
1121N/A#
1121N/A# CDDL HEADER START
1121N/A#
1121N/A# The contents of this file are subject to the terms of the
1121N/A# Common Development and Distribution License (the "License").
1121N/A# You may not use this file except in compliance with the License.
1121N/A#
1121N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1121N/A# or http://www.opensolaris.org/os/licensing.
1121N/A# See the License for the specific language governing permissions
1121N/A# and limitations under the License.
1121N/A#
1121N/A# When distributing Covered Code, include this CDDL HEADER in each
1121N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1121N/A# If applicable, add the following below this CDDL HEADER, with the
1121N/A# fields enclosed by brackets "[]" replaced with your own identifying
1121N/A# information: Portions Copyright [yyyy] [name of copyright owner]
1121N/A#
1121N/A# CDDL HEADER END
1121N/A#
1121N/A
1121N/A#
1121N/A# Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
1121N/A# Copyright 2014 Garrett D'Amore <garrett@damore.org>
3231N/A#
1121N/A
1182N/ASYNCPROG= syncinit syncloop syncstat
1121N/A
1121N/APROG= 6to4relay arp if_mpadm \
1121N/A in.comsat in.fingerd in.rarpd in.rexecd in.rlogind \
1121N/A in.rshd in.rwhod in.telnetd in.tftpd ipaddrsel \
1121N/A ndd ndp $(SYNCPROG) wanbootutil
1121N/A
1121N/AMANIFEST= rarp.xml telnet.xml comsat.xml finger.xml \
1121N/A login.xml shell.xml rexec.xml socket-filter-kssl.xml
1183N/ASVCMETHOD= svc-sockfilter
1121N/A
1121N/AROOTFS_PROG= hostconfig route soconfig
1121N/ASBINLINKS= hostconfig route
3853N/A
1121N/ARPCSVCPROG= hostconfig
1121N/AAUDITPROG= in.rexecd in.rlogind in.rshd in.telnetd
1121N/APAMPROG= in.rexecd in.rlogind in.rshd in.telnetd
1121N/ASOCKETPROG= 6to4relay arp hostconfig if_mpadm in.comsat \
1121N/A in.fingerd in.rarpd in.rexecd in.rlogind in.rshd \
1121N/A in.rwhod in.telnetd in.tftpd ipaddrsel ndp route
1121N/ANSLPROG= 6to4relay arp hostconfig in.comsat in.rarpd \
1121N/A in.rexecd in.rlogind in.rshd in.rwhod in.telnetd \
1121N/A in.tftpd ipaddrsel ndp route
1121N/ACMDPROG= in.telnetd
1121N/AK5PROGS= in.telnetd in.rlogind in.rshd
1121N/ATSNETPROG= route
1121N/ADLADMPROG= 6to4relay
1121N/ADEFAULTFILES= telnetd.dfl
1121N/A
1121N/APROGSRCS= $(PROG:%=%.c)
1121N/ATFTPDOBJS= in.tftpd.o tftpsubs.o
1121N/AOTHERSRC= ../usr.bin/tftp/tftpsubs.c
1121N/AK5RLOGINOBJS= in.rlogind.o
1121N/AK5RSHDOBJS= in.rshd.o
1121N/AK5TELNETOBJS= in.telnetd.o
3853N/ASRCS= $(PROGSRCS) $(OTHERSRC)
1121N/A
1121N/ASUBDIRS= bootconfchk ifconfig ilbadm in.rdisc in.routed \
1121N/A in.talkd inetadm inetconv ipadm ipmpstat ipqosconf ipsecutils \
1121N/A kssl/kssladm kssl/ksslcfg nwamadm nwamcfg ping routeadm \
1121N/A snoop sppptun traceroute wificonfig
1121N/A
1121N/AMSGSUBDIRS= bootconfchk ifconfig ilbadm in.routed in.talkd \
1121N/A inetadm inetconv ipadm ipmpstat ipqosconf ipsecutils \
1121N/A kssl/ksslcfg nwamadm nwamcfg routeadm sppptun snoop wificonfig
3853N/A
1121N/A# As programs get lint-clean, add them here and to the 'lint' target.
1121N/A# Eventually this hack should go away, and all in PROG should be
1121N/A# lint-clean.
1121N/ALINTCLEAN= 6to4relay arp in.rlogind in.rshd in.telnetd in.tftpd \
3853N/A ipaddrsel ndp route \
1121N/A in.rarpd if_mpadm $(SYNCPROG)
1121N/A# Likewise, as subdirs get lint-clean, add them here. Once
1121N/A# they're all clean, replace the dependency of the lint target
1121N/A# with SUBDIRS. Also (sigh) deal with the commented-out build lines
1121N/A# for the lint rule.
1121N/ALINTSUBDIRS= bootconfchk ilbadm in.rdisc in.routed in.talkd inetadm \
1121N/A inetconv ipmpstat ipqosconf ipsecutils kssl/kssladm \
1121N/A kssl/ksslcfg nwamadm nwamcfg ping routeadm sppptun traceroute \
1121N/A wificonfig
1121N/A# And as programs are verified not to attempt to write into constants,
1121N/A# -xstrconst should be used to ensure they stay that way.
1121N/ACONSTCLEAN=
1121N/A
1121N/Ainclude ../../Makefile.cmd
1121N/AROOTMANIFESTDIR= $(ROOTSVCNETWORK)
1121N/A$(ROOTMANIFEST) := FILEMODE= 444
1121N/Ainclude ../Makefile.cmd-inet
1121N/A
1121N/AROOTSBINPROG = $(ROOTFS_PROG:%=$(ROOTSBIN)/%)
1121N/AROOTUSRSBINLINKS = $(SBINLINKS:%=$(ROOTUSRSBIN)/%)
1121N/A
1121N/ACOMMONOBJS= addr_match.o kcmd.o store_forw_creds.o
1121N/ACOMMONSRCS= $(COMMONOBJS:%.o=$(CMDINETCOMMONDIR)/%.c)
1121N/ASRCS+= $(COMMONSRCS)
1121N/A
1121N/ACERRWARN += -_gcc=-Wno-implicit-function-declaration
1121N/ACERRWARN += -_gcc=-Wno-uninitialized
1121N/ACERRWARN += -_gcc=-Wno-unused-variable
1121N/ACERRWARN += -_gcc=-Wno-unused-function
1121N/ACERRWARN += -_gcc=-Wno-parentheses
1121N/ACERRWARN += -_gcc=-Wno-char-subscripts
1121N/ACERRWARN += -_gcc=-Wno-extra
1121N/ACERRWARN += -_gcc=-Wno-address
1121N/A
1121N/A#
1121N/A# Message catalog
1121N/A#
1121N/APOFILES= 6to4relay.po if_mpadm.po in.comsat.po ipaddrsel.po route.po \
1121N/A soconfig.po
1121N/APOFILE= usr.sbin.po
1121N/A
1121N/Aall:= TARGET= all
1121N/Ainstall:= TARGET= install
1121N/Aclean:= TARGET= clean
1121N/Aclobber:= TARGET= clobber
1121N/Alint:= TARGET= lint
1121N/A_msg:= TARGET= _msg
1121N/A
1121N/ACLOBBERFILES += $(ROOTFS_PROG) $(PROG)
1121N/ACLEANFILES += $(COMMONOBJS) $(K5RLOGINOBJS) $(K5RSHDOBJS) $(TFTPDOBJS) \
1121N/A $(K5TELNETOBJS)
1121N/A
1121N/ACPPFLAGS += -DSYSV -DBSD_COMP -I$(CMDINETCOMMONDIR) -I
1121N/A
1121N/Ainclude $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
1121N/AK5LIBS=
1121N/A
1121N/A# Eventually just plain CFLAGS should be += -v, but not until all in
1121N/A# PROGS are lint clean.
1121N/A$(LINTCLEAN) := CFLAGS += $(CCVERBOSE)
1121N/A$(CONSTCLEAN) := CFLAGS += $(XSTRCONST)
1121N/A
1121N/A$(SYNCPROG) := LDLIBS += -ldlpi
1121N/A$(SOCKETPROG) := LDLIBS += -lsocket
1121N/A$(NSLPROG) := LDLIBS += -lnsl
1121N/A$(AUDITPROG) := LDLIBS += -lbsm
1121N/A$(PAMPROG) := LDLIBS += -lpam
1121N/A$(RPCSVCPROG) := LDLIBS += -lrpcsvc
1121N/A$(K5PROGS) := LDFLAGS += $(KRUNPATH) \
1121N/A -L$(ROOT)$(KLIBDIR_DO) -L$(ROOT)$(KLIBDIR_GL)
1121N/A$(K5PROGS) := K5LIBS= -lmech_krb5
1121N/A$(K5PROGS) := CPPFLAGS += -I$(SRC)/head \
1121N/A -I$(SRC)/uts/common/ \
1121N/A -I$(SRC)/uts/common/gssapi/mechs/krb5/include \
1121N/A -I$(SRC)/lib/gss_mechs/mech_krb5/include \
1121N/A -I$(SRC)/lib/pam_modules/krb5
1121N/ALDLIBS += $(K5LIBS)
1121N/A$(TSNETPROG) := LDLIBS += -ltsnet
1121N/A$(DLADMPROG) := LDLIBS += -ldladm
1121N/A
1121N/Ain.rarpd := LDLIBS += -linetutil -ldlpi
1121N/Aif_mpadm := LDLIBS += -linetutil -lipmp
1121N/Aif_mpadm.po := XGETFLAGS += -a
1121N/Aroute := CPPFLAGS += -DNDEBUG
1121N/Andd := LDLIBS += -ldladm -lipadm
1121N/Ain.comsat := LDFLAGS += $(MAPFILE.NGB:%=-M%)
1121N/A
1121N/A.KEEP_STATE:
1121N/A
1121N/A.PARALLEL:
1121N/A
1121N/Aall: $(PROG) $(ROOTFS_PROG) $(SUBDIRS) THIRDPARTYLICENSE.arp
1121N/A
1121N/A#
1121N/A# message catalog
1121N/A#
1121N/A_msg: $(MSGSUBDIRS) $(POFILE)
1121N/A
1121N/Asyncutil: $(SYNCPROG)
1121N/A
1121N/A$(POFILE): $(POFILES)
1121N/A $(RM) $@
1121N/A cat $(POFILES) > $@
1121N/A
1121N/A%.o: $(CMDINETCOMMONDIR)/%.c
1121N/A $(COMPILE.c) -o $@ $<
1121N/A
1121N/Ain.telnetd: $(K5TELNETOBJS)
1121N/A $(LINK.c) $(K5TELNETOBJS) -o $@ $(LDLIBS)
1121N/A $(POST_PROCESS)
1121N/A
1121N/Ain.rlogind: $(K5RLOGINOBJS) $(COMMONOBJS)
1121N/A $(LINK.c) $(K5RLOGINOBJS) $(COMMONOBJS) -o $@ $(LDLIBS)
1121N/A $(POST_PROCESS)
1121N/A
1121N/Ain.rshd: $(K5RSHDOBJS) $(COMMONOBJS)
1121N/A $(LINK.c) $(K5RSHDOBJS) $(COMMONOBJS) -o $@ $(LDLIBS)
1121N/A $(POST_PROCESS)
1121N/A
1121N/Ain.tftpd: $(TFTPDOBJS)
1121N/A $(LINK.c) $(TFTPDOBJS) -o $@ $(LDLIBS)
1121N/A $(POST_PROCESS)
1121N/A
1121N/Atftpsubs.o: $(OTHERSRC)
1121N/A $(COMPILE.c) $(OTHERSRC) -o $@
1121N/A $(POST_PROCESS_O)
1121N/A
1121N/A$(ROOTUSRSBINLINKS):
1121N/A -$(RM) $@; $(SYMLINK) ../../sbin/$(@F) $@
1121N/A
1121N/Ainstall: $(PROG) $(ROOTFS_PROG) $(SUBDIRS) .WAIT $(ROOTUSRSBINPROG) \
$(ROOTSBINPROG) $(ROOTUSRSBINLINKS) $(ROOTETCDEFAULTFILES) \
$(ROOTMANIFEST) $(ROOTSVCMETHOD) THIRDPARTYLICENSE.arp
THIRDPARTYLICENSE.arp: arp.c
$(SED) -n '/University of California/,/SUCH DAMAGE/p' arp.c > $@
CLOBBERFILES += THIRDPARTYLICENSE.arp
#
# The reason this rule checks for the existence of the
# Makefile is that some of the directories do not exist
# in our exportable source builds.
#
$(SUBDIRS): FRC
@if [ -f $@/Makefile ]; then \
cd $@; pwd; $(MAKE) $(TARGET); \
else \
true; \
fi
FRC:
check: $(CHKMANIFEST)
clean: $(SUBDIRS) clean_local
clean_local:
$(RM) $(CLEANFILES)
clobber: $(SUBDIRS) clobber_local
clobber_local: clean_local
$(RM) $(CLOBBERFILES)
lint: $(LINTSUBDIRS)
$(LINT.c) 6to4relay.c $(LDLIBS) -lsocket -ldladm
$(LINT.c) arp.c $(LDLIBS) -lsocket -lnsl
@# $(LINT.c) in.rexecd.c $(LDLIBS) -lbsm -lpam
$(LINT.c) -erroff=E_NAME_USED_NOT_DEF2 -erroff=E_NAME_DEF_NOT_USED2 \
-I$(SRC)/head -I$(SRC)/uts/common/ \
-I$(SRC)/uts/common/gssapi/mechs/krb5/include \
-I$(SRC)/lib/gss_mechs/mech_krb5/include \
-I$(SRC)/lib/pam_modules/krb5 \
in.rlogind.c $(COMMONSRCS) $(LDLIBS) -lbsm -lpam -lsocket -lnsl
$(LINT.c) -erroff=E_NAME_USED_NOT_DEF2 -erroff=E_NAME_DEF_NOT_USED2 \
-I$(SRC)/head -I$(SRC)/uts/common/ \
-I$(SRC)/uts/common/gssapi/mechs/krb5/include \
-I$(SRC)/lib/gss_mechs/mech_krb5/include \
-I$(SRC)/lib/pam_modules/krb5 \
in.rshd.c $(COMMONSRCS) $(LDLIBS) -lbsm -lpam -lsocket -lnsl
$(LINT.c) -erroff=E_NAME_USED_NOT_DEF2 \
-erroff=E_GLOBAL_COULD_BE_STATIC2 \
-I$(SRC)/head -I$(SRC)/uts/common/ \
-I$(SRC)/uts/common/gssapi/mechs/krb5/include \
-I$(SRC)/lib/gss_mechs/mech_krb5/include \
-I$(SRC)/lib/pam_modules/krb5 \
in.telnetd.c $(LDLIBS) -lbsm -lpam -lsocket -lnsl
$(LINT.c) if_mpadm.c $(LDLIBS) -lsocket -lnsl -lipmp -linetutil
$(LINT.c) ipaddrsel.c $(LDLIBS) -lsocket -lnsl
$(LINT.c) route.c $(LDLIBS) -lsocket -lnsl -ltsnet
$(LINT.c) syncinit.c $(LDLIBS) -ldlpi
$(LINT.c) syncloop.c $(LDLIBS) -ldlpi
$(LINT.c) syncstat.c $(LDLIBS) -ldlpi
$(LINT.c) -erroff=E_NAME_USED_NOT_DEF2 in.rarpd.c $(LDLIBS) \
-lsocket -lnsl
$(LINT.c) ndp.c $(LDLIBS) \
-lsocket -lnsl
$(LINT.c) in.tftpd.c ../usr.bin/tftp/tftpsubs.c $(LDLIBS) \
-lsocket -lnsl