Move /var/svc/log to /var/log/svc
[unleashed/lotheac.git] / usr / src / cmd / cmd-inet / usr.sbin / in.routed / Makefile
blobce8bd91f43df6ef9db27a5a83261647b9cbf1610
3 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
4 # Use is subject to license terms.
6 # Copyright (c) 2018, Joyent, Inc.
8 ROUTEDPROG= in.routed
9 ROUTEDOBJS= common.o if.o input.o main.o output.o parms.o radix.o \
10 rdisc.o table.o trace.o
11 ROUTEDSRCS= $(ROUTEDOBJS:.o=.c)
12 RTQUERYPROG= rtquery
13 RTQUERYOBJS= common.o rtquery.o
14 RTQUERYSRCS= $(RTQUERYOBJS:.o=.c)
15 POFILEOBJS= $(ROUTEDOBJS) $(RTQUERYOBJS)
17 PROG= $(ROUTEDPROG) $(RTQUERYPROG)
18 SRCS= $(ROUTEDSRCS) $(RTQUERYSRCS)
20 MANIFEST= route.xml
22 include ../../../Makefile.cmd
24 ROOTMANIFESTDIR= $(ROOTSVCNETWORKROUTING)
27 # in.routed uses ancillary data features available through
28 # the Open Group's Networking Services standard. The following
29 # pre-processor definitions enable these features.
31 _D_XOPEN_EXTN = -D_XOPEN_SOURCE=500 -D__EXTENSIONS__
33 CPPFLAGS += $(_D_XOPEN_EXTN)
34 CERRWARN += -Wno-parentheses
35 CERRWARN += -Wno-uninitialized
36 # not linted
37 SMATCH=off
39 LDLIBS += -lmd
40 CLEAN_FILES += $(ROUTEDOBJS) $(RTQUERYOBJS)
41 CLOBBERFILES += $(ROUTEDPROG) $(RTQUERYPROG)
43 # Message catalog
45 POFILE= in.routed.po
46 POFILES= $(POFILEOBJS:.o=.po)
48 $(ROUTEDPROG):= LDLIBS += -lkstat
50 # This needs to be done because of SPARC/x86 differences. On x86,
51 # double has required alignment of only 4 bytes, but on SPARC it's 8
52 # bytes. This means that sockaddr_in can be casted to
53 # sockaddr_storage without complaint on x86, but requires a
54 # suppression directive on SPARC.
56 CTFCONVERT_HOOK = && $(CTFCONVERT_O)
57 CTFMERGE_HOOK = && $(CTFMERGE) -L VERSION -o $@ $(ROUTEDOBJS)
58 $(ROUTEDOBJS) := CFLAGS += $(CTF_FLAGS)
59 $(RTQUERYOBJS) := CFLAGS += $(CTF_FLAGS)
61 .KEEP_STATE:
63 .PARALLEL: $(ROUTEDPROG) $(RTQUERYOBJS)
65 all: $(PROG)
67 $(POFILE): $(POFILES)
68 $(RM) $@
69 cat $(POFILES) > $@
71 $(ROUTEDPROG): $(ROUTEDOBJS)
72 $(LINK.c) -o $@ $(ROUTEDOBJS) $(LDLIBS) $(CTFMERGE_HOOK)
73 $(POST_PROCESS)
75 $(RTQUERYPROG): $(RTQUERYOBJS)
76 $(LINK.c) -o $@ $(RTQUERYOBJS) $(LDLIBS) -lresolv $(CTFMERGE_HOOK)
77 $(POST_PROCESS)
79 install: all $(ROOTUSRSBINPROG) $(ROOTMANIFEST)
81 check: $(CHKMANIFEST)
83 clean:
84 $(RM) $(CLEAN_FILES)
86 include ../../../Makefile.targ