Print this page
10080 smatch Makefile changes for usr/src/cmd
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/cmd-inet/usr.sbin/in.routed/Makefile
+++ new/usr/src/cmd/cmd-inet/usr.sbin/in.routed/Makefile
1 1 #
2 2 #
3 3 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
4 4 # Use is subject to license terms.
5 5 #
6 +# Copyright (c) 2018, Joyent, Inc.
6 7
7 8 ROUTEDPROG= in.routed
8 9 ROUTEDOBJS= common.o if.o input.o main.o output.o parms.o radix.o \
9 10 rdisc.o table.o trace.o
10 11 ROUTEDSRCS= $(ROUTEDOBJS:.o=.c)
11 12 RTQUERYPROG= rtquery
12 13 RTQUERYOBJS= common.o rtquery.o
13 14 RTQUERYSRCS= $(RTQUERYOBJS:.o=.c)
14 15 POFILEOBJS= $(ROUTEDOBJS) $(RTQUERYOBJS)
15 16
16 17 PROG= $(ROUTEDPROG) $(RTQUERYPROG)
17 18 SRCS= $(ROUTEDSRCS) $(RTQUERYSRCS)
18 19
19 20 MANIFEST= route.xml
20 21 SVCMETHOD= svc-route
21 22
22 23 include ../../../Makefile.cmd
23 24
24 25 ROOTMANIFESTDIR= $(ROOTSVCNETWORKROUTING)
25 26
26 27 #
27 28 # in.routed uses ancillary data features available through
28 29 # the Open Group's Networking Services standard. The following
29 30 # pre-processor definitions enable these features.
30 31 #
31 32 _D_XOPEN_EXTN = -D_XOPEN_SOURCE=500 -D__EXTENSIONS__
↓ open down ↓ |
16 lines elided |
↑ open up ↑ |
32 33
33 34 # Turning on __EXTENSIONS__ breaks lint, and we need __EXTENSIONS__.
34 35 # This is really a lint problem, so around the breakage.
35 36 LINTFLAGS += -erroff=E_FUNC_DECL_VAR_ARG2 -erroff=E_INCONS_VAL_TYPE_DECL2 \
36 37 -erroff=E_INCONS_ARG_DECL2 -erroff=E_INCONS_ARG_USED2
37 38
38 39 CPPFLAGS += $(_D_XOPEN_EXTN)
39 40 CFLAGS += $(CCVERBOSE)
40 41 CERRWARN += -_gcc=-Wno-parentheses
41 42 CERRWARN += -_gcc=-Wno-uninitialized
43 +# not linted
44 +SMATCH=off
45 +
42 46 LDLIBS += -lxnet -lmd -lsocket
43 47 CLEAN_FILES += $(ROUTEDOBJS) $(RTQUERYOBJS)
44 48 CLOBBERFILES += $(ROUTEDPROG) $(RTQUERYPROG)
45 49 #
46 50 # Message catalog
47 51 #
48 52 POFILE= in.routed.po
49 53 POFILES= $(POFILEOBJS:.o=.po)
50 54 #
51 55 $(ROUTEDPROG):= LDLIBS += -lkstat
52 56 lint := LDLIBS += -lkstat
53 57
54 58 # This needs to be done because of SPARC/x86 differences. On x86,
55 59 # double has required alignment of only 4 bytes, but on SPARC it's 8
56 60 # bytes. This means that sockaddr_in can be casted to
57 61 # sockaddr_storage without complaint on x86, but requires a
58 62 # suppression directive on SPARC.
59 63 LINTFLAGS += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
60 64
61 65 CTFCONVERT_HOOK = && $(CTFCONVERT_O)
62 66 CTFMERGE_HOOK = && $(CTFMERGE) -L VERSION -o $@ $(ROUTEDOBJS)
63 67 $(ROUTEDOBJS) := CFLAGS += $(CTF_FLAGS)
64 68 $(RTQUERYOBJS) := CFLAGS += $(CTF_FLAGS)
65 69
66 70 .KEEP_STATE:
67 71
68 72 .PARALLEL: $(ROUTEDPROG) $(RTQUERYOBJS)
69 73
70 74 all: $(PROG)
71 75
72 76 $(POFILE): $(POFILES)
73 77 $(RM) $@
74 78 cat $(POFILES) > $@
75 79
76 80 $(ROUTEDPROG): $(ROUTEDOBJS)
77 81 $(LINK.c) -o $@ $(ROUTEDOBJS) $(LDLIBS) $(CTFMERGE_HOOK)
78 82 $(POST_PROCESS)
79 83
80 84 $(RTQUERYPROG): $(RTQUERYOBJS)
81 85 $(LINK.c) -o $@ $(RTQUERYOBJS) $(LDLIBS) -lresolv $(CTFMERGE_HOOK)
82 86 $(POST_PROCESS)
83 87
84 88 lint:
85 89 $(LINT.c) $(ROUTEDSRCS) $(LDLIBS)
86 90 $(LINT.c) $(RTQUERYSRCS) $(LDLIBS)
87 91
88 92 install: all $(ROOTUSRSBINPROG) $(ROOTMANIFEST) $(ROOTSVCMETHOD)
89 93
90 94 check: $(CHKMANIFEST)
91 95
92 96 clean:
93 97 $(RM) $(CLEAN_FILES)
94 98
95 99 include ../../../Makefile.targ
↓ open down ↓ |
44 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX