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