Print this page
11528 Makefile.noget can get gone
11529 Use -Wno-maybe-initialized
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/geniconvtbl/Makefile.com
+++ new/usr/src/cmd/geniconvtbl/Makefile.com
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
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 # Copyright 2007 Sun Microsystems, Inc. All rights reserved.
22 22 # Use is subject to license terms.
23 23 #
24 24 # Copyright (c) 2019, Joyent, Inc.
25 25 #
26 26
27 27 $(NOT_NATIVE)NATIVE_BUILD = $(POUND_SIGN)
28 28
29 29 ITM = geniconvtbl.so
30 30 PROG = geniconvtbl
31 31
32 32 SRCSH1 = iconv_tm.h hash.h
33 33 SRCCH1 = itmcomp.h itm_util.h maptype.h
34 34 SRCSC1 = itmcomp.c assemble.c disassemble.c itm_util.c
35 35 SRCY1 = itm_comp.y
36 36 SRCL1 = itm_comp.l
37 37 SRCI1 = geniconvtbl.c
38 38
39 39
40 40 YTABC = y.tab.c
41 41 YTABH = y.tab.h
42 42 LEXYY = lex.yy.c
43 43 YOUT = y.output
44 44 MAPFILE = ../mapfile
45 45
46 46
47 47
48 48 SRCSH = $(SRCSH1:%.h=../%.h)
49 49 SRCCH = $(SRCCH1:%.h=../%.h)
50 50 SRCSC = $(SRCSC1:%.c=../%.c)
51 51 SRCI = $(SRCI1:%.c=../%.c)
52 52 SRCY = $(SRCY1:%.y=../%.y)
53 53 SRCL = $(SRCL1:%.l=../%.l)
54 54
55 55 SRCYC = $(SRCY:%.y=%.c)
56 56 SRCLC = $(SRCL:%.l=%.c)
57 57
58 58 SRCS = $(SRCSC) $(YTABC) $(LEXYY)
59 59 HDRS = $(SRCCH1) $(ERNOSTRH)
60 60
61 61
62 62
63 63 SED = sed
64 64 LEXSED = ../lex.sed
65 65 YACCSED = ../yacc.sed
66 66
67 67
68 68
69 69 # include ../../../lib/Makefile.lib
70 70 include ../../Makefile.cmd
71 71
72 72
73 73 ROOTDIRS32= $(ROOTLIB)/iconv
74 74 ROOTDIRS64= $(ROOTLIB)/iconv/$(MACH64)
75 75 ROOTITM32 = $(ROOTDIRS32)/$(ITM)
76 76 ROOTITM64 = $(ROOTDIRS64)/$(ITM)
77 77
↓ open down ↓ |
77 lines elided |
↑ open up ↑ |
78 78 # defined for some useful targets like clean,
79 79 OBJS = $(SRCSC1:%.c=%.o) $(YTABC:.c=.o) $(LEXYY:.c=.o)
80 80
81 81 CHECKHDRS = $(HDRS%.h=%.check)
82 82
83 83 CLOBBERFILES= $(ITM) $(SRCYC)
84 84 CLEANFILES = $(OBJS) $(YTABC) $(YTABH) $(LEXYY) $(YOUT) \
85 85 $(POFILES) $(POFILE)
86 86
87 87 CPPFLAGS += -I. -I..
88 -CERRWARN += -_gcc=-Wno-uninitialized
88 +CERRWARN += $(CNOWARN_UNINIT)
89 89 CERRWARN += -_gcc=-Wno-unused-label
90 90 CERRWARN += -_gcc=-Wno-switch
91 91 CERRWARN += -_gcc=-Wno-unused-variable
92 92 CERRWARN += -_gcc=-Wno-implicit-function-declaration
93 93 YFLAGS += -d -v
94 94 CFLAGS += -D_FILE_OFFSET_BITS=64
95 95
96 96 # dump_expr() is too hairy
97 97 SMATCH=off
98 98
99 99 $(ITM) := CFLAGS += $(GSHARED) $(C_PICFLAGS) $(ZTEXT) -h$@
100 100 $(ITM) := CPPFLAGS += -D_REENTRANT
101 101 $(ITM) := sparc_CFLAGS += -xregs=no%appl
102 102 $(ITM) := sparcv9_CFLAGS += -xregs=no%appl
103 103
104 104 LDLIBS += -lgen
105 105
106 106 MY_NATIVE_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -I. -I..
107 107 MY_NATIVE_LDFLAGS = $(MAPFILE.NES:%=-M%) $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%)
108 108 MY_NATIVE_LDLIBS = -lgen
109 109
110 110 #
111 111 # Message catalog
112 112 #
113 113 POFILES= $(SRCSC1:%.c=%.po) $(SRCI1:%.c=%.po) \
114 114 $(SRCY1:%.y=%.po) $(SRCL1:%.l=%.po)
115 115
116 116 POFILE= geniconvtbl_.po
117 117
118 118
119 119
120 120
121 121
122 122 .KEEP_STATE:
123 123
124 124 .PARALLEL: $(ITM) $(OBJS)
125 125
126 126 $(PROG): $(OBJS)
127 127 $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
128 128 $(POST_PROCESS)
129 129
130 130 $(ITM): $(SRCI)
131 131 $(CC) $(CFLAGS) $(CPPFLAGS) -M$(MAPFILE) -o $@ $(SRCI) $(LDLIBS)
132 132 $(POST_PROCESS_SO)
133 133
134 134 $(YTABC) $(YTABH): $(SRCY)
135 135 $(YACC) $(YFLAGS) $(SRCY)
136 136 @ $(MV) $(YTABC) $(YTABC)~
137 137 @ $(SED) -f $(YACCSED) $(YTABC)~ > $(YTABC)
138 138 @ $(RM) $(YTABC)~
139 139
140 140 $(LEXYY): $(SRCL) $(YTABH)
141 141 $(LEX) -t $(SRCL) | $(SED) -f $(LEXSED) > $(LEXYY)
142 142
143 143
144 144 $(POFILE): .WAIT $(POFILES)
145 145 $(RM) $@
146 146 $(CAT) $(POFILES) >$@
147 147
148 148 $(POFILES): $(SRCSC) $(SRCI) $(SRCY) $(SRCL)
149 149
150 150 %.po: ../%.c
151 151 $(COMPILE.cpp) $< > $<.i
152 152 $(BUILD.po)
153 153
154 154
155 155 lint : lint_SRCS1 lint_SRCS2
156 156
157 157
158 158 lint_SRCS1: $(SRCS)
159 159 $(LINT.c) $(SRCS) $(LDLIBS)
160 160
161 161 lint_SRCS2: $(SRCI)
162 162 $(LINT.c) $(SRCI) $(LDLIBS)
163 163
164 164
165 165
166 166 hdrchk: $(HDRCHECKS)
167 167
168 168 cstyle: $(SRCS)
169 169 $(DOT_C_CHECK)
170 170
171 171 clean:
172 172 $(RM) $(CLEANFILES)
173 173
174 174 %.o: %.c
175 175 $(COMPILE.c) $<
176 176
177 177 %.o: ../%.c
178 178 $(COMPILE.c) $<
179 179
180 180
181 181
182 182 # install rule
183 183 $(ROOTDIRS32)/%: $(ROOTDIRS32) %
184 184 -$(INS.file)
185 185
186 186 $(ROOTDIRS64)/%: $(ROOTDIRS64) %
187 187 -$(INS.file)
188 188
189 189 $(ROOTDIRS32): $(ROOTLIB)
190 190 -$(INS.dir)
191 191
192 192 $(ROOTDIRS64): $(ROOTDIRS32)
193 193 -$(INS.dir)
194 194
195 195 $(ROOTLIB) $(ROOTBIN):
196 196 -$(INS.dir)
197 197
198 198 include ../../Makefile.targ
199 199
↓ open down ↓ |
101 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX