Print this page
10080 smatch Makefile changes for usr/src/cmd
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/ttymon/Makefile
+++ new/usr/src/cmd/ttymon/Makefile
1 1 #
2 2 # CDDL HEADER START
3 3 #
4 4 # The contents of this file are subject to the terms of the
5 5 # Common Development and Distribution License (the "License").
6 6 # You may not use this file except in compliance with the License.
7 7 #
8 8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 # or http://www.opensolaris.org/os/licensing.
10 10 # See the License for the specific language governing permissions
11 11 # and limitations under the License.
12 12 #
13 13 # When distributing Covered Code, include this CDDL HEADER in each
14 14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 # If applicable, add the following below this CDDL HEADER, with the
↓ open down ↓ |
15 lines elided |
↑ open up ↑ |
16 16 # fields enclosed by brackets "[]" replaced with your own identifying
17 17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 18 #
19 19 # CDDL HEADER END
20 20 #
21 21
22 22 #
23 23 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 24 # Use is subject to license terms.
25 25 #
26 +# Copyright (c) 2018, Joyent, Inc.
26 27
27 28 PROG= stty ttymon ttyadm sttydefs
28 29 XPG4PROG= stty
29 30
30 31 # the 'stty' objects have to be made in a separate directory
31 32 # since only they are built with the -DEUC flag (see below).
32 33 STTYOBJ= sttyobjs/stty.o sttyobjs/sttytable.o sttyobjs/sttyparse.o
33 34
34 35 XPG4STTYOBJ= sttyobjs.xpg4/stty.o sttyobjs.xpg4/sttytable.o \
35 36 sttyobjs.xpg4/sttyparse.o
36 37
37 38 TTYMONOBJ= ttymon.o tmglobal.o tmhandler.o tmpmtab.o tmttydefs.o \
38 39 tmparse.o tmsig.o tmsac.o tmchild.o tmautobaud.o tmterm.o \
39 40 tmutmp.o tmpeek.o tmlog.o tmlock.o tmutil.o tmexpress.o \
40 41 sttytable.o sttyparse.o ulockf.o
41 42
42 43 TTYADMOBJ= ttyadm.o tmutil.o admutil.o
43 44
44 45 STTYDEFSOBJ= sttydefs.o admutil.o tmttydefs.o tmparse.o sttytable.o \
45 46 sttyparse.o
46 47
47 48 OBJS= $(STTYOBJ) $(XPG4STTYOBJ) $(TTYMONOBJ) $(TTYADMOBJ) $(STTYDEFSOBJ)
48 49 STTYSRC= stty.c sttytable.c sttyparse.c
49 50 TTYMONSRC= $(TTYMONOBJ:%.o=%.c)
50 51 TTYADMSRC= $(TTYADMOBJ:%.o=%.c)
51 52 STTYDEFSSRC= $(STTYDEFSOBJ:%.o=%.c)
52 53 SRCS= $(STTYSRC) $(TTYMONSRC) $(TTYADMSRC) $(STTYDEFSSRC)
53 54
54 55 .PARALLEL: $(OBJS) $(PROG)
55 56
56 57 include ../Makefile.cmd
57 58
58 59 # If machine name and /etc/issue file need to be printed
59 60 # before the service prompt is printed, then: CPPFLAGS += -DSYS_NAME
60 61 # If debug is needed, then: CPPFLAGS += -DDEBUG
61 62 # fix for 1111333 - turn on SYS_NAME so /etc/issue will be read if it exists
62 63 CPPFLAGS += -DSYS_NAME
63 64 $(XPG4):= CPPFLAGS += -DXPG4
64 65 sttydefs := LDLIBS += -lnsl
65 66 ttymon := LDLIBS += -lnsl -lsec -ldevinfo
66 67
67 68 # Only stty can be built with -DEUC. ttymon will dump core unless further
68 69 # changes are made to it.
69 70 $(STTYOBJ) := CPPFLAGS += -DEUC
70 71 $(XPG4STTYOBJ) := CPPFLAGS += -DEUC
↓ open down ↓ |
35 lines elided |
↑ open up ↑ |
71 72
72 73 LINTFLAGS = -b -x
73 74 CFLAGS += $(CCVERBOSE)
74 75 LDFLAGS += $(MAPFILE.NGB:%=-M%)
75 76
76 77 CERRWARN += -_gcc=-Wno-parentheses
77 78 CERRWARN += -_gcc=-Wno-unused-variable
78 79 CERRWARN += -_gcc=-Wno-uninitialized
79 80 CERRWARN += -_gcc=-Wno-extra
80 81
82 +# not linted
83 +SMATCH=off
84 +
81 85 #
82 86 # Message catalog
83 87 #
84 88 POFILES= $(STTYOBJ:sttyobjs/%.o=%.po)
85 89 POFILE= ttymon.po
86 90
87 91
88 92 LIBSAFD= $(ROOTLIB)/saf
89 93 DIRS= $(LIBSAFD)
90 94 LIBSAF= ttymon
91 95 USRSBINF= sttydefs ttyadm
92 96 BINF= stty
93 97 ROOTLIBF= $(LIBSAF:%=$(LIBSAFD)/%)
94 98 ROOTUSRSBINF= $(USRSBINF:%=$(ROOTUSRSBIN)/%)
95 99 ROOTBINF= $(BINF:%=$(ROOTBIN)/%)
96 100 $(ROOTLIBF) := FILEMODE = 0555
97 101 $(ROOTUSRSBINF) := FILEMODE = 0755
98 102
99 103 $(LIBSAFD)/% : %
100 104 $(INS.file)
101 105
102 106 # /usr/xpg6/bin/stty is a symlink to /usr/bin/stty
103 107 ROOTXPG6SYMLINK= $(ROOTXPG6BIN)/stty
104 108 .KEEP_STATE:
105 109
106 110 all: $(PROG) $(XPG4)
107 111
108 112 stty: sttyobjs $(STTYOBJ) $(MAPFILE.NGB)
109 113 $(LINK.c) $(STTYOBJ) -o $@ $(LDLIBS)
110 114 $(POST_PROCESS)
111 115
112 116 stty.xpg4: $(XPG4STTYOBJ) $(MAPFILE.NGB)
113 117 $(LINK.c) $(XPG4STTYOBJ) -o $@ $(LDLIBS)
114 118 $(POST_PROCESS)
115 119
116 120 $(XPG4STTYOBJ): sttyobjs.xpg4
117 121
118 122 sttyobjs/%.o: %.c
119 123 $(COMPILE.c) -o $@ $<
120 124
121 125 sttyobjs.xpg4/%.o: %.c
122 126 $(COMPILE.c) -o $@ $<
123 127
124 128 sttyobjs:
125 129 -@mkdir -p $@
126 130
127 131 sttyobjs.xpg4:
128 132 -@mkdir -p $@
129 133
130 134 ttymon: $(TTYMONOBJ) $(MAPFILE.NGB)
131 135 $(LINK.c) $(TTYMONOBJ) -o $@ $(LDLIBS) -lpam
132 136 $(POST_PROCESS)
133 137
134 138 ttyadm: $(TTYADMOBJ) $(MAPFILE.NGB)
135 139 $(LINK.c) $(TTYADMOBJ) -o $@ $(LDLIBS)
136 140 $(POST_PROCESS)
137 141
138 142 sttydefs: $(STTYDEFSOBJ) $(MAPFILE.NGB)
139 143 $(LINK.c) $(STTYDEFSOBJ) -o $@ $(LDLIBS)
140 144 $(POST_PROCESS)
141 145
142 146 install: all $(DIRS) $(ROOTLIBF) $(ROOTUSRSBINF) $(ROOTBINF) \
143 147 $(ROOTXPG4PROG) $(ROOTXPG6SYMLINK)
144 148 -$(RM) $(ROOTETC)/getty
145 149 -$(SYMLINK) ../usr/lib/saf/ttymon $(ROOTETC)/getty
146 150
147 151 $(ROOTXPG6SYMLINK): $(ROOTBINF)
148 152 -$(RM) $@
149 153 -$(SYMLINK) ../../bin/$(BINF) $@
150 154
151 155 $(POFILE): $(POFILES)
152 156 $(RM) $@
153 157 cat $(POFILES) > $@
154 158
155 159 $(DIRS):
156 160 $(INS.dir)
157 161
158 162 clean:
159 163 $(RM) $(OBJS)
160 164
161 165 lint:
162 166 $(LINT.c) $(STTYSRC)
163 167 $(LINT.c) $(TTYMONSRC)
164 168 $(LINT.c) $(TTYADMSRC)
165 169 $(LINT.c) $(STTYDEFSSRC)
166 170
167 171 include ../Makefile.targ
↓ open down ↓ |
77 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX