Makefile revision 6ba597c56d749c61b4f783157f63196d7b2445f0
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# CDDL HEADER START
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# The contents of this file are subject to the terms of the
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# Common Development and Distribution License (the "License").
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# You may not use this file except in compliance with the License.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# See the License for the specific language governing permissions
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# and limitations under the License.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# When distributing Covered Code, include this CDDL HEADER in each
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# If applicable, add the following below this CDDL HEADER, with the
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# fields enclosed by brackets "[]" replaced with your own identifying
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# information: Portions Copyright [yyyy] [name of copyright owner]
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# CDDL HEADER END
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# Use is subject to license terms.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# EXPORT DELETE START
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# EXPORT DELETE END
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce in.comsat in.fingerd in.rarpd in.rexecd in.rlogind \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric LuceMANIFEST= rarp.xml telnet.xml comsat.xml finger.xml \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric LuceSOCKETPROG= 6to4relay arp gettable hostconfig if_mpadm in.comsat \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce in.fingerd in.rarpd in.rexecd in.rlogind in.rshd \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric LuceNSLPROG= 6to4relay arp gettable hostconfig in.comsat in.rarpd \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce in.rexecd in.rlogind in.rshd in.rwhod in.telnetd \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric LuceSUBDIRS= bootconfchk htable ifconfig ilbadm in.ftpd in.rdisc in.routed \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce in.talkd inetadm inetconv ipmpstat ipqosconf ipsecutils \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce kssl/kssladm kssl/ksslcfg nwamadm nwamcfg ping routeadm \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric LuceMSGSUBDIRS= bootconfchk htable ifconfig ilbadm in.ftpd in.routed in.talkd \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce inetadm inetconv ipmpstat ipqosconf ipsecutils kssl/ksslcfg \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# As programs get lint-clean, add them here and to the 'lint' target.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# Eventually this hack should go away, and all in PROG should be
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# lint-clean.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric LuceLINTCLEAN= 6to4relay arp in.rlogind in.rshd in.telnetd in.tftpd \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# Likewise, as subdirs get lint-clean, add them here. Once
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# they're all clean, replace the dependency of the lint target
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# with SUBDIRS. Also (sigh) deal with the commented-out build lines
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# for the lint rule.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric LuceLINTSUBDIRS= bootconfchk ilbadm in.rdisc in.routed in.talkd inetadm \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce inetconv ipmpstat ipqosconf ipsecutils nwamadm nwamcfg ping \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# And as programs are verified not to attempt to write into constants,
78d65c654251b02c41628914986723cbec93a7a1Andreas Gustafsson# -xstrconst should be used to ensure they stay that way.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric LuceCOMMONSRCS= $(COMMONOBJS:%.o=$(CMDINETCOMMONDIR)/%.c)
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# Message catalog
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric LucePOFILES= 6to4relay.po if_mpadm.po in.comsat.po ipaddrsel.po route.po
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric LuceCLEANFILES += $(COMMONOBJS) $(K5RLOGINOBJS) $(K5RSHDOBJS) $(TFTPDOBJS)
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric LuceCPPFLAGS += -DSYSV -DBSD_COMP -I$(CMDINETCOMMONDIR) -I
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luceinclude $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# Eventually just plain CFLAGS should be += -v, but not until all in
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# PROGS are lint clean.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Lucegettable in.comsat := LDFLAGS += $(MAPFILE.NGB:%=-M%)
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luceall: $(PROG) $(ROOTFS_PROG) $(SUBDIRS) THIRDPARTYLICENSE.arp
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# message catalog
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce $(LINK.c) $(K5RLOGINOBJS) $(COMMONOBJS) -o $@ $(LDLIBS)
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce $(LINK.c) $(K5RSHDOBJS) $(COMMONOBJS) -o $@ $(LDLIBS)
5f09ce124cad9712a9675f17f83ddc915e734909Andreas Gustafsson -$(RM) $@; $(SYMLINK) ../../sbin/$(@F) $@
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luceinstall: $(PROG) $(ROOTFS_PROG) $(SUBDIRS) .WAIT $(ROOTUSRSBINPROG) \
5f09ce124cad9712a9675f17f83ddc915e734909Andreas Gustafsson $(ROOTSBINPROG) $(ROOTUSRSBINLINKS) $(ROOTETCDEFAULTFILES) \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce $(SED) -n '/University of California/,/SUCH DAMAGE/p' arp.c > $@
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# The reason this rule checks for the existence of the
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# Makefile is that some of the directories do not exist
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# in our exportable source builds.
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce @if [ -f $@/Makefile ]; then \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce @# $(LINT.c) in.rexecd.c $(LDLIBS) -lbsm -lpam
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce $(LINT.c) -erroff=E_NAME_USED_NOT_DEF2 -erroff=E_NAME_DEF_NOT_USED2 \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce in.rlogind.c $(COMMONSRCS) $(LDLIBS) -lbsm -lpam -lsocket -lnsl
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce $(LINT.c) -erroff=E_NAME_USED_NOT_DEF2 -erroff=E_NAME_DEF_NOT_USED2 \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce in.rshd.c $(COMMONSRCS) $(LDLIBS) -lbsm -lpam -lsocket -lnsl
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce $(LINT.c) if_mpadm.c $(LDLIBS) -lsocket -lnsl -lipmp -linetutil
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce $(LINT.c) route.c $(LDLIBS) -lsocket -lnsl -ltsnet
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce $(LINT.c) -erroff=E_NAME_USED_NOT_DEF2 in.rarpd.c $(LDLIBS) \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce $(LINT.c) in.tftpd.c ../usr.bin/tftp/tftpsubs.c $(LDLIBS) \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# EXPORT DELETE START
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
f293a69bcd1c1dd7bdac8f4102fc2398b9e475c8Eric Luce# EXPORT DELETE END