Makefile revision 948f2876ce2a3010558f4f6937e16086ebcd36f2
98N/A#
98N/A# CDDL HEADER START
1246N/A#
98N/A# The contents of this file are subject to the terms of the
98N/A# Common Development and Distribution License (the "License").
919N/A# You may not use this file except in compliance with the License.
919N/A#
919N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
919N/A# or http://www.opensolaris.org/os/licensing.
919N/A# See the License for the specific language governing permissions
919N/A# and limitations under the License.
919N/A#
919N/A# When distributing Covered Code, include this CDDL HEADER in each
919N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
919N/A# If applicable, add the following below this CDDL HEADER, with the
919N/A# fields enclosed by brackets "[]" replaced with your own identifying
919N/A# information: Portions Copyright [yyyy] [name of copyright owner]
919N/A#
919N/A# CDDL HEADER END
919N/A#
919N/A
919N/A#
98N/A# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
98N/A# Use is subject to license terms.
98N/A#
98N/A# ident "%Z%%M% %I% %E% SMI"
810N/A#
810N/A
810N/ASYNCPROG= syncinit syncloop syncstat
810N/ADHCPPROG= dhcpconfig dhtadm pntadm
354N/A
354N/A# EXPORT DELETE START
354N/AXMODPROG= wanbootutil
354N/A# EXPORT DELETE END
354N/A
354N/APROG= 6to4relay arp gettable if_mpadm \
354N/A in.comsat in.fingerd in.rarpd in.rexecd in.rlogind \
354N/A in.rshd in.rwhod in.telnetd in.tftpd ipaddrsel \
606N/A ndd $(SYNCPROG) $(DHCPPROG) $(XMODPROG)
810N/A
1123N/AMANIFEST= rarp.xml telnet.xml comsat.xml finger.xml \
606N/A login.xml shell.xml rexec.xml
354N/A
810N/AROOTFS_PROG= hostconfig route soconfig
824N/ASBINLINKS= hostconfig route
810N/A
830N/ARPCSVCPROG= hostconfig
1026N/AAUDITPROG= in.rexecd in.rlogind in.rshd in.telnetd
810N/APAMPROG= in.rexecd in.rlogind in.rshd in.telnetd
1029N/ASOCKETPROG= 6to4relay arp gettable hostconfig if_mpadm in.comsat \
1123N/A in.fingerd in.rarpd in.rexecd in.rlogind in.rshd \
1123N/A in.rwhod in.telnetd in.tftpd ipaddrsel route
1123N/ANSLPROG= 6to4relay arp gettable hostconfig in.comsat in.rarpd \
1123N/A in.rexecd in.rlogind in.rshd in.rwhod in.telnetd \
1123N/A in.tftpd ipaddrsel route
810N/ACMDPROG= in.telnetd
810N/AK5PROGS= in.telnetd in.rlogind in.rshd
810N/ATSNETPROG= route
1123N/ADEFAULTFILES= telnetd.dfl
810N/A
851N/APROGSRCS= $(PROG:%=%.c)
851N/ATFTPDOBJS= in.tftpd.o tftpsubs.o
810N/AOTHERSRC= ../usr.bin/tftp/tftpsubs.c
810N/AK5RLOGINOBJS= in.rlogind.o
810N/AK5RSHDOBJS= in.rshd.o
810N/ASRCS= $(PROGSRCS) $(OTHERSRC)
810N/A
851N/ASUBDIRS= bootconfchk htable ifconfig in.ftpd in.rdisc in.routed \
810N/A in.talkd inetadm inetconv ipqosconf kssl/kssladm \
851N/A kssl/ksslcfg mipagentconfig mipagentstat ping routeadm \
810N/A snoop sppptun traceroute wificonfig ipsecutils
810N/A
810N/AMSGSUBDIRS= bootconfchk htable ifconfig in.ftpd in.routed in.talkd \
810N/A inetadm inetconv ipqosconf kssl/ksslcfg mipagentconfig \
810N/A mipagentstat routeadm sppptun snoop wificonfig
810N/A
851N/A# As programs get lint-clean, add them here and to the 'lint' target.
810N/A# Eventually this hack should go away, and all in PROG should be
851N/A# lint-clean.
1010N/ALINTCLEAN= 6to4relay arp in.rlogind in.rshd in.telnetd in.tftpd \
851N/A ipaddrsel route \
810N/A in.rarpd if_mpadm $(SYNCPROG)
810N/A# Likewise, as subdirs get lint-clean, add them here. Once
810N/A# they're all clean, replace the dependency of the lint target
810N/A# with SUBDIRS. Also (sigh) deal with the commented-out build lines
810N/A# for the lint rule.
810N/ALINTSUBDIRS= bootconfchk in.rdisc in.routed in.talkd inetadm inetconv \
1246N/A ipqosconf mipagentstat ping routeadm sppptun traceroute \
1029N/A wificonfig ipsecutils
810N/A# And as programs are verified not to attempt to write into constants,
851N/A# -xstrconst should be used to ensure they stay that way.
851N/ACONSTCLEAN=
851N/A
851N/Ainclude ../../Makefile.cmd
851N/AROOTMANIFESTDIR= $(ROOTSVCNETWORK)
98N/A$(ROOTMANIFEST) := FILEMODE= 444
824N/Ainclude ../Makefile.cmd-inet
98N/A
98N/AROOTSBINPROG = $(ROOTFS_PROG:%=$(ROOTSBIN)/%)
830N/AROOTUSRSBINLINKS = $(SBINLINKS:%=$(ROOTUSRSBIN)/%)
1026N/A
851N/ACOMMONOBJS= addr_match.o kcmd.o
824N/ACOMMONSRCS= $(COMMONOBJS:%.o=$(CMDINETCOMMONDIR)/%.c)
571N/ASRCS+= $(COMMONSRCS)
98N/A
98N/A#
98N/A# Message catalog
1029N/A#
1123N/APOFILES= 6to4relay.po if_mpadm.po in.comsat.po ipaddrsel.po route.po
1123N/APOFILE= usr.sbin.po
1123N/A
1123N/Aall:= TARGET= all
1123N/Ainstall:= TARGET= install
341N/Aclean:= TARGET= clean
366N/Aclobber:= TARGET= clobber
354N/Alint:= TARGET= lint
425N/A_msg:= TARGET= _msg
325N/A
456N/ACLOBBERFILES += $(ROOTFS_PROG) $(PROG)
577N/ACLEANFILES += $(COMMONOBJS) $(K5RLOGINOBJS) $(K5RSHDOBJS) $(TFTPDOBJS)
325N/A
354N/ACPPFLAGS += -DSYSV -DBSD_COMP -I$(CMDINETCOMMONDIR) -I
278N/A
98N/Ainclude $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
543N/AK5LIBS=
98N/A
749N/A# Eventually just plain CFLAGS should be += -v, but not until all in
749N/A# PROGS are lint clean.
98N/A$(LINTCLEAN) := CFLAGS += $(CCVERBOSE)
151N/A$(CONSTCLEAN) := CFLAGS += $(XSTRCONST)
137N/A
153N/A$(SYNCPROG) := LDLIBS += -ldlpi
210N/A$(SOCKETPROG) := LDLIBS += -lsocket
366N/A$(NSLPROG) := LDLIBS += -lnsl
98N/A$(AUDITPROG) := LDLIBS += -lbsm
179N/A$(PAMPROG) := LDLIBS += -lpam
269N/A$(RPCSVCPROG) := LDLIBS += -lrpcsvc
126N/A$(K5PROGS) := LDFLAGS += $(ZLAZYLOAD) $(KRUNPATH) \
98N/A -L$(ROOT)$(KLIBDIR_DO) -L$(ROOT)$(KLIBDIR_GL)
98N/A$(K5PROGS) := K5LIBS= -lmech_krb5
287N/A$(K5PROGS) := CPPFLAGS += -I$(SRC)/head \
366N/A -I$(SRC)/uts/common/ \
499N/A -I$(SRC)/uts/common/gssapi/mechs/krb5/include \
123N/A -I$(SRC)/lib/gss_mechs/mech_krb5/include \
98N/A -I$(SRC)/lib/pam_modules/krb5
98N/ALDLIBS += $(K5LIBS)
98N/A$(TSNETPROG) := LDLIBS += $(ZLAZYLOAD) -ltsnet $(ZNOLAZYLOAD)
98N/A
851N/Ain.rarpd := LDLIBS += -linetutil -ldlpi
1029N/Aroute := CPPFLAGS += -DNDEBUG
1138N/Agettable in.comsat := LDFLAGS += $(MAPFILE.NGB:%=-M%)
98N/A
98N/A.KEEP_STATE:
98N/A
851N/A.PARALLEL:
98N/A
744N/Aall: $(PROG) $(ROOTFS_PROG) $(SUBDIRS) THIRDPARTYLICENSE.arp
1138N/A
747N/A#
744N/A# message catalog
744N/A#
744N/A_msg: $(MSGSUBDIRS) $(POFILE)
493N/A
967N/Asyncutil: $(SYNCPROG)
98N/A
493N/A$(POFILE): $(POFILES)
493N/A $(RM) $@
967N/A cat $(POFILES) > $@
810N/A
%.o: $(CMDINETCOMMONDIR)/%.c
$(COMPILE.c) -o $@ $<
in.rlogind: $(K5RLOGINOBJS) $(COMMONOBJS)
$(LINK.c) $(K5RLOGINOBJS) $(COMMONOBJS) -o $@ $(LDLIBS)
$(POST_PROCESS)
in.rshd: $(K5RSHDOBJS) $(COMMONOBJS)
$(LINK.c) $(K5RSHDOBJS) $(COMMONOBJS) -o $@ $(LDLIBS)
$(POST_PROCESS)
in.tftpd: $(TFTPDOBJS)
$(LINK.c) $(TFTPDOBJS) -o $@ $(LDLIBS)
$(POST_PROCESS)
tftpsubs.o: $(OTHERSRC)
$(COMPILE.c) $(OTHERSRC) -o $@
$(POST_PROCESS_O)
$(ROOTUSRSBINLINKS):
-$(RM) $@; $(SYMLINK) ../../sbin/$(@F) $@
install: $(PROG) $(ROOTFS_PROG) $(SUBDIRS) .WAIT $(ROOTUSRSBINPROG) \
$(ROOTSBINPROG) $(ROOTUSRSBINLINKS) $(ROOTETCDEFAULTFILES) \
$(ROOTMANIFEST) 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)
-$(RM) $(CLEANFILES)
clobber: $(SUBDIRS)
-$(RM) $(CLEANFILES) $(CLOBBERFILES)
lint: $(LINTSUBDIRS)
$(LINT.c) 6to4relay.c $(LDLIBS) -lsocket -lnsl
$(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
$(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