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