Print this page
10079 smatch Makefile changes for usr/src/lib
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/lib/iconv_modules/utf-8/Makefile.com
+++ new/usr/src/lib/iconv_modules/utf-8/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 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 src/OPENSOLARIS.LICENSE.
↓ open down ↓ |
14 lines elided |
↑ open up ↑ |
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 #
22 22 # Copyright 2010 Sun Microsystems, Inc. All rights reserved.
23 23 # Use is subject to license terms.
24 24 #
25 +# Copyright (c) 2018, Joyent, Inc.
25 26
26 27 include $(SRC)/Makefile.master
27 28
28 29 BTS_DIR = $(ROOT)/usr/lib/iconv/geniconvtbl/binarytables
29 30
30 31 # geniconvtbl loadmodule
31 32 GENICONVTBL= /usr/bin/geniconvtbl
32 33 #
33 34 # Common sources come from following directory:
34 35 COMMON = ../common/
35 36 GENI_SRCS = ../common/binarytables/srcs
36 37
37 38 include $(SRC)/lib/iconv_modules/Makefile.iconv
38 39 include $(SRC)/lib/iconv_modules/utf-8/Makefile.iconv
39 40
40 41 CLEANFILES = *.o *.so core *.bt
41 42
42 43 .NO_PARALLEL:
43 44
44 45 .PARALLEL: $(DYNOBJS) $(BINARYTABLES)
45 46
46 47
47 48 all: $(DYNOBJS) $(BINARYTABLES)
48 49
49 50 install: all $(ICONV_DIR) $(BTS_DIR) $(ICONV_DIR)/alias
50 51 for f in $(BINARYTABLES) ; do \
51 52 TMP=`echo $$f | $(TR) "+" "%"` ; \
52 53 echo installing $$TMP to $(BTS_DIR) ; \
53 54 $(RM) $(BTS_DIR)/$$TMP ; \
54 55 $(CP) $$f $(BTS_DIR)/$$TMP ; \
55 56 $(CHMOD) 444 $(BTS_DIR)/$$TMP ; \
56 57 done
57 58 for f in $(DYNOBJS) ; do \
58 59 TMP=`echo $$f | $(TR) "+" "%"` ; \
59 60 echo installing $$TMP to $(ICONV_DIR) ; \
60 61 $(RM) $(ICONV_DIR)/$$TMP ; \
61 62 $(CP) $$f $(ICONV_DIR)/$$TMP ; \
62 63 $(CHMOD) 755 $(ICONV_DIR)/$$TMP ; \
63 64 done
64 65 -@echo "done."
65 66
66 67
67 68 $(BTS_DIR):
↓ open down ↓ |
33 lines elided |
↑ open up ↑ |
68 69 $(INS.dir) $@
69 70
70 71 clobber: clean
71 72
72 73 $(ICONV_DIR)/alias:= FILEMODE=0444
73 74
74 75 LDLIBS = -lc
75 76
76 77 LDFLAGS = $(DYNFLAGS) $(LDLIBS) $(CFLAG_OPT)
77 78
79 +# needs work
80 +SMATCH=off
81 +
78 82 $(DYNOBJS) := CFLAGS += $(XREGSFLAG) $(C_PICFLAGS) -D_REENTRANT \
79 83 -I$(COMMON) -I$(COMMON)/tbls \
80 84 -I$(ADJUNCT_PROTO)/usr/include
81 85
82 86 $(UCS_2_SOS) := CFLAGS += -DUCS_2
83 87 $(UCS_2BE_SOS) := CFLAGS += -DUCS_2BE
84 88 $(UCS_2LE_SOS) := CFLAGS += -DUCS_2LE
85 89
86 90 $(UTF_16_SOS) := CFLAGS += -DUTF_16
87 91 $(UTF_16BE_SOS) := CFLAGS += -DUTF_16BE
88 92 $(UTF_16LE_SOS) := CFLAGS += -DUTF_16LE
89 93
90 94 $(UTF_32_SOS) := CFLAGS += -DUTF_32
91 95 $(UTF_32BE_SOS) := CFLAGS += -DUTF_32BE
92 96 $(UTF_32LE_SOS) := CFLAGS += -DUTF_32LE
93 97
94 98 $(UCS_4_SOS) := CFLAGS += -DUCS_4
95 99 $(UCS_4BE_SOS) := CFLAGS += -DUCS_4BE
96 100 $(UCS_4LE_SOS) := CFLAGS += -DUCS_4LE
97 101
98 102 $(UTF_8_SOS) := CFLAGS += -DUTF_8
99 103
100 104 $(US_ASCII_SOS) := CFLAGS += -DUS_ASCII
101 105 $(ISO_8859_1_SOS) := CFLAGS += -DISO_8859_1
102 106 $(ISO_8859_2_SOS) := CFLAGS += -DISO_8859_2
103 107 $(ISO_8859_3_SOS) := CFLAGS += -DISO_8859_3
104 108 $(ISO_8859_4_SOS) := CFLAGS += -DISO_8859_4
105 109 $(ISO_8859_5_SOS) := CFLAGS += -DISO_8859_5
106 110 $(ISO_8859_6_SOS) := CFLAGS += -DISO_8859_6
107 111 $(ISO_8859_7_SOS) := CFLAGS += -DISO_8859_7
108 112 $(ISO_8859_8_SOS) := CFLAGS += -DISO_8859_8
109 113 $(ISO_8859_9_SOS) := CFLAGS += -DISO_8859_9
110 114 $(ISO_8859_10_SOS) := CFLAGS += -DISO_8859_10
111 115 $(ISO_8859_13_SOS) := CFLAGS += -DISO_8859_13
112 116 $(ISO_8859_14_SOS) := CFLAGS += -DISO_8859_14
113 117 $(ISO_8859_15_SOS) := CFLAGS += -DISO_8859_15
114 118 $(ISO_8859_16_SOS) := CFLAGS += -DISO_8859_16
115 119 $(KOI8_R) := CFLAGS += -DKOI8_R
116 120 $(KOI8_U) := CFLAGS += -DKOI8_U
117 121 $(PTCP154) := CFLAGS += -DPTCP154
118 122 $(CP437_SOS) := CFLAGS += -DCP437
119 123 $(CP720_SOS) := CFLAGS += -DCP720
120 124 $(CP737_SOS) := CFLAGS += -DCP737
121 125 $(CP775_SOS) := CFLAGS += -DCP775
122 126 $(CP850_SOS) := CFLAGS += -DCP850
123 127 $(CP852_SOS) := CFLAGS += -DCP852
124 128 $(CP855_SOS) := CFLAGS += -DCP855
125 129 $(CP857_SOS) := CFLAGS += -DCP857
126 130 $(CP860_SOS) := CFLAGS += -DCP860
127 131 $(CP861_SOS) := CFLAGS += -DCP861
128 132 $(CP862_SOS) := CFLAGS += -DCP862
129 133 $(CP863_SOS) := CFLAGS += -DCP863
130 134 $(CP864_SOS) := CFLAGS += -DCP864
131 135 $(CP865_SOS) := CFLAGS += -DCP865
132 136 $(CP866_SOS) := CFLAGS += -DCP866
133 137 $(CP869_SOS) := CFLAGS += -DCP869
134 138 $(CP874_SOS) := CFLAGS += -DCP874
135 139 $(CP1250_SOS) := CFLAGS += -DCP1250
136 140 $(CP1251_SOS) := CFLAGS += -DCP1251
137 141 $(CP1252_SOS) := CFLAGS += -DCP1252
138 142 $(CP1253_SOS) := CFLAGS += -DCP1253
139 143 $(CP1254_SOS) := CFLAGS += -DCP1254
140 144 $(CP1255_SOS) := CFLAGS += -DCP1255
141 145 $(CP1256_SOS) := CFLAGS += -DCP1256
142 146 $(CP1257_SOS) := CFLAGS += -DCP1257
143 147 $(CP1258_SOS) := CFLAGS += -DCP1258
144 148
145 149 $(ACE_TO_UTF_8_SO) := CFLAGS += -DICV_ACE_TO_UTF8
146 150 $(ACE_ALLOW_UNAS_TO_UTF_8_SO) := CFLAGS += -DICV_ACE_TO_UTF8 \
147 151 -DICV_IDN_ALLOW_UNASSIGNED
148 152 $(UTF_8_TO_ACE_SO) := CFLAGS += -DICV_UTF8_TO_ACE
149 153 $(UTF_8_TO_ACE_ALLOW_UNAS_SO) := CFLAGS += -DICV_UTF8_TO_ACE \
150 154 -DICV_IDN_ALLOW_UNASSIGNED
151 155 #
152 156 # Dependencies and actual compilations are defined at below.
153 157 $(SB_TO_UCS_SOS): $(COMMON)/common_defs.h $(COMMON)/sb_to_ucs.h $(COMMON)/sb_to_ucs.c
154 158 $(CC) $(CFLAGS) $(COMMON)/sb_to_ucs.c -c -o $@.o
155 159 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $@.o
156 160 $(POST_PROCESS_SO)
157 161
158 162 $(UCS_TO_SB_SOS): $(COMMON)/common_defs.h $(COMMON)/ucs_to_sb.h $(COMMON)/ucs_to_sb.c
159 163 $(CC) $(CFLAGS) $(COMMON)/ucs_to_sb.c -c -o $@.o
160 164 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $@.o
161 165 $(POST_PROCESS_SO)
162 166
163 167 $(SB_TO_UTF_8_SOS): $(COMMON)/common_defs.h $(COMMON)/sb_to_utf8.h $(COMMON)/sb_to_utf8.c
164 168 $(CC) $(CFLAGS) $(COMMON)/sb_to_utf8.c -c -o $@.o
165 169 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $@.o
166 170 $(POST_PROCESS_SO)
167 171
168 172 $(UTF_8_TO_SB_SOS): $(COMMON)/common_defs.h $(COMMON)/utf8_to_sb.h $(COMMON)/utf8_to_sb.c
169 173 $(CC) $(CFLAGS) $(COMMON)/utf8_to_sb.c -c -o $@.o
170 174 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $@.o
171 175 $(POST_PROCESS_SO)
172 176
173 177 $(UCS_4_TO_UCS_SOS): $(COMMON)/common_defs.h $(COMMON)/ucs4_to_ucs.h $(COMMON)/ucs4_to_ucs.c
174 178 $(CC) $(CFLAGS) $(COMMON)/ucs4_to_ucs.c -c -o $@.o
175 179 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $@.o
176 180 $(POST_PROCESS_SO)
177 181
178 182 $(UCS_TO_UCS_4_SOS): $(COMMON)/common_defs.h $(COMMON)/ucs_to_ucs4.h $(COMMON)/ucs_to_ucs4.c
179 183 $(CC) $(CFLAGS) $(COMMON)/ucs_to_ucs4.c -c -o $@.o
180 184 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $@.o
181 185 $(POST_PROCESS_SO)
182 186
183 187 $(UCS_4_TO_UTF_32_SOS): $(COMMON)/common_defs.h $(COMMON)/ucs4_to_ucs.h $(COMMON)/ucs4_to_ucs.c
184 188 $(CC) $(CFLAGS) $(COMMON)/ucs4_to_utf32.c -c -o $@.o
185 189 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $@.o
186 190 $(POST_PROCESS_SO)
187 191
188 192 $(UTF_32_TO_UCS_4_SOS): $(COMMON)/common_defs.h $(COMMON)/ucs_to_ucs4.h $(COMMON)/ucs_to_ucs4.c
189 193 $(CC) $(CFLAGS) $(COMMON)/utf32_to_ucs4.c -c -o $@.o
190 194 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $@.o
191 195 $(POST_PROCESS_SO)
192 196
193 197 $(UCS_TO_UTF_8_SOS): $(COMMON)/common_defs.h $(COMMON)/ucs_to_utf8.h $(COMMON)/ucs_to_utf8.c
194 198 $(CC) $(CFLAGS) $(COMMON)/ucs_to_utf8.c -c -o $@.o
195 199 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $@.o
196 200 $(POST_PROCESS_SO)
197 201
198 202 $(UTF_8_TO_UCS_SOS): $(COMMON)/common_defs.h $(COMMON)/utf8_to_ucs.h $(COMMON)/utf8_to_ucs.c
199 203 $(CC) $(CFLAGS) $(COMMON)/utf8_to_ucs.c -c -o $@.o
200 204 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $@.o
201 205 $(POST_PROCESS_SO)
202 206
203 207 $(UCS_TO_UTF_7_SOS): $(COMMON)/common_defs.h $(COMMON)/ucs_to_utf7.h $(COMMON)/ucs_to_utf7.c
204 208 $(CC) $(CFLAGS) $(COMMON)/ucs_to_utf7.c -c -o $@.o
205 209 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $@.o
206 210 $(POST_PROCESS_SO)
207 211
208 212 $(UTF_7_TO_UCS_SOS): $(COMMON)/common_defs.h $(COMMON)/utf7_to_ucs.h $(COMMON)/utf7_to_ucs.c
209 213 $(CC) $(CFLAGS) $(COMMON)/utf7_to_ucs.c -c -o $@.o
210 214 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $@.o
211 215 $(POST_PROCESS_SO)
212 216
213 217 $(UTF_8_TO_UTF_EBCDIC_SO): $(COMMON)/common_defs.h $(COMMON)/utf8_to_utf_ebcdic.h $(COMMON)/utf8_to_utf_ebcdic.c
214 218 $(CC) $(CFLAGS) $(COMMON)/utf8_to_utf_ebcdic.c -c -o $@.o
215 219 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $@.o
216 220 $(POST_PROCESS_SO)
217 221
218 222 $(UTF_EBCDIC_TO_UTF_8_SO): $(COMMON)/common_defs.h $(COMMON)/utf_ebcdic_to_utf8.h $(COMMON)/utf_ebcdic_to_utf8.c
219 223 $(CC) $(CFLAGS) $(COMMON)/utf_ebcdic_to_utf8.c -c -o $@.o
220 224 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $@.o
221 225 $(POST_PROCESS_SO)
222 226
223 227 $(ACE_TO_UTF_8_SO): $(COMMON)/ace.h $(COMMON)/ace_utf8.c
224 228 $(CC) $(CFLAGS) $(COMMON)/ace_utf8.c -c -o $@.o
225 229 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $@.o
226 230 $(POST_PROCESS_SO)
227 231
228 232 $(ACE_ALLOW_UNAS_TO_UTF_8_SO): $(COMMON)/ace.h $(COMMON)/ace_utf8.c
229 233 $(CC) $(CFLAGS) $(COMMON)/ace_utf8.c -c -o $@.o
230 234 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $@.o
231 235 $(POST_PROCESS_SO)
232 236
233 237 $(UTF_8_TO_ACE_SO): $(COMMON)/ace.h $(COMMON)/ace_utf8.c
234 238 $(CC) $(CFLAGS) $(COMMON)/ace_utf8.c -c -o $@.o
235 239 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $@.o
236 240 $(POST_PROCESS_SO)
237 241
238 242 $(UTF_8_TO_ACE_ALLOW_UNAS_SO): $(COMMON)/ace.h $(COMMON)/ace_utf8.c
239 243 $(CC) $(CFLAGS) $(COMMON)/ace_utf8.c -c -o $@.o
240 244 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $@.o
241 245 $(POST_PROCESS_SO)
242 246
243 247 $(UTF_8_TO_UTF_8_SO): $(COMMON)/common_defs.h $(COMMON)/utf8.c
244 248 $(CC) $(CFLAGS) $(COMMON)/utf8.c -c -o $@.o
245 249 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $@.o
246 250 $(POST_PROCESS_SO)
247 251
248 252
249 253 #
250 254 # Rules for binary tables:
251 255 .SUFFIXES: $(SUFFIXES) .src
252 256 .SUFFIXES: $(SUFFIXES) .bt
253 257
254 258 %.bt: $(GENI_SRCS)/%.src
255 259 $(GENICONVTBL) -o $@ -f $<
↓ open down ↓ |
168 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX