Makefile revision 734b6a94890be549309b21156f8ed6d4561cac51
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt#
3e02c9e33656dcd9c364633d42dd785d3e6fdd66Automatic Updater# ident "%Z%%M% %I% %E% SMI"
3e02c9e33656dcd9c364633d42dd785d3e6fdd66Automatic Updater#
3e02c9e33656dcd9c364633d42dd785d3e6fdd66Automatic Updater# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
c6fb85f9500350e5ce58c9a24f5d264c8a8bd6f4Automatic Updater# Use is subject to license terms.
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt#
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
3e02c9e33656dcd9c364633d42dd785d3e6fdd66Automatic UpdaterROUTEDPROG= in.routed
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntROUTEDOBJS= common.o if.o input.o main.o output.o parms.o radix.o \
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt rdisc.o table.o trace.o
3e02c9e33656dcd9c364633d42dd785d3e6fdd66Automatic UpdaterROUTEDSRCS= $(ROUTEDOBJS:.o=.c)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntRTQUERYPROG= rtquery
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntRTQUERYOBJS= common.o rtquery.o
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntRTQUERYSRCS= $(RTQUERYOBJS:.o=.c)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntPOFILEOBJS= $(ROUTEDOBJS) $(RTQUERYOBJS)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
64affc54f96a2c71cbd10ed71e246ce0746259aaAutomatic UpdaterPROG= $(ROUTEDPROG) $(RTQUERYPROG)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntSRCS= $(ROUTEDSRCS) $(RTQUERYSRCS)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Huntinclude ../../../Makefile.cmd
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
2cbb4ab75757fbb656997a82c14ca07db37d481aAutomatic Updater#
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# in.routed uses ancillary data features available through
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# the Open Group's Networking Services standard. The following
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# pre-processor definitions enable these features.
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater#
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt_D_XOPEN_EXTN = -D_XOPEN_SOURCE=500 -D__EXTENSIONS__
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# Turning on __EXTENSIONS__ breaks lint, and we need __EXTENSIONS__.
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# This is really a lint problem, so around the breakage.
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntLINTFLAGS += -erroff=E_FUNC_DECL_VAR_ARG2 -erroff=E_INCONS_VAL_TYPE_DECL2 \
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt -erroff=E_INCONS_ARG_DECL2 -erroff=E_INCONS_ARG_USED2
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntCPPFLAGS += $(_D_XOPEN_EXTN)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntCFLAGS += $(CCVERBOSE)
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterLDLIBS += -lxnet -lmd -lsocket
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntCLEAN_FILES += $(ROUTEDOBJS) $(RTQUERYOBJS)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntCLOBBERFILES += $(ROUTEDPROG) $(RTQUERYPROG)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt#
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# Message catalog
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt#
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntPOFILE= in.routed.po
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntPOFILES= $(POFILEOBJS:.o=.po)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt#
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt$(ROUTEDPROG):= LDLIBS += -lkstat
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Huntlint := LDLIBS += -lkstat
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# This needs to be done because of SPARC/x86 differences. On x86,
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# double has required alignment of only 4 bytes, but on SPARC it's 8
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic Updater# bytes. This means that sockaddr_in can be casted to
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# sockaddr_storage without complaint on x86, but requires a
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# suppression directive on SPARC.
575e15fed997a3ad1cb35c5b9ef34ab24ce47e72Automatic UpdaterLINTFLAGS += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt.KEEP_STATE:
fd0b768f4c23d22c89f8a156a632831583b7fb68Automatic Updater
fd0b768f4c23d22c89f8a156a632831583b7fb68Automatic Updater.PARALLEL: $(ROUTEDPROG) $(RTQUERYOBJS)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Huntall: $(PROG)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
575e15fed997a3ad1cb35c5b9ef34ab24ce47e72Automatic Updater$(POFILE): $(POFILES)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt $(RM) $@
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt cat $(POFILES) > $@
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt$(ROUTEDPROG): $(ROUTEDOBJS)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt $(LINK.c) -o $@ $(ROUTEDOBJS) $(LDLIBS)
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater $(POST_PROCESS)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt$(RTQUERYPROG): $(RTQUERYOBJS)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt $(LINK.c) -o $@ $(RTQUERYOBJS) $(LDLIBS) -lresolv
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt $(POST_PROCESS)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Huntlint:
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt $(LINT.c) $(ROUTEDSRCS) $(LDLIBS)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt $(LINT.c) $(RTQUERYSRCS) $(LDLIBS)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Huntinstall: all $(ROOTUSRSBINPROG) $(MANTARGET)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Huntclean:
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic Updater $(RM) $(CLEAN_FILES)
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic Updater
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic Updaterinclude ../../../Makefile.targ
64affc54f96a2c71cbd10ed71e246ce0746259aaAutomatic Updater