xref: /illumos-gate/usr/src/lib/iconv_modules/utf-8/Makefile.com (revision 1fa2a66491e7d8ae0be84e7da4da8e812480c710)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21#
22# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# Copyright (c) 2018, Joyent, Inc.
26
27include $(SRC)/Makefile.master
28
29#
30# Common sources come from following directory:
31COMMON			= ../common/
32
33include $(SRC)/lib/iconv_modules/Makefile.iconv
34include $(SRC)/lib/iconv_modules/utf-8/Makefile.iconv
35
36CLEANFILES =    *.o *.so
37
38.NO_PARALLEL:
39
40.PARALLEL: $(DYNOBJS)
41
42all: $(DYNOBJS)
43
44install: all $(ICONV_DIR)
45	for f in $(DYNOBJS) ; do \
46		TMP=`echo $$f | $(TR) "+" "%"` ; \
47		echo installing $$TMP to $(ICONV_DIR) ; \
48		$(RM) $(ICONV_DIR)/$$TMP ; \
49		$(CP) $$f $(ICONV_DIR)/$$TMP ; \
50		$(CHMOD) 755 $(ICONV_DIR)/$$TMP ; \
51	done
52	-@echo "done."
53
54clobber: clean
55
56LDLIBS			= -lc
57
58LDFLAGS = $(DYNFLAGS) $(LDLIBS) $(CFLAG_OPT)
59
60# needs work
61SMATCH=off
62
63$(DYNOBJS)		:= CFLAGS += $(XREGSFLAG) $(C_PICFLAGS) -D_REENTRANT \
64					-I$(COMMON) -I$(COMMON)/tbls \
65					-I$(ADJUNCT_PROTO)/usr/include
66
67$(UCS_2_SOS)		:= CFLAGS += -DUCS_2
68$(UCS_2BE_SOS)		:= CFLAGS += -DUCS_2BE
69$(UCS_2LE_SOS)		:= CFLAGS += -DUCS_2LE
70
71$(UTF_16_SOS)		:= CFLAGS += -DUTF_16
72$(UTF_16BE_SOS)		:= CFLAGS += -DUTF_16BE
73$(UTF_16LE_SOS)		:= CFLAGS += -DUTF_16LE
74
75$(UTF_32_SOS)		:= CFLAGS += -DUTF_32
76$(UTF_32BE_SOS)		:= CFLAGS += -DUTF_32BE
77$(UTF_32LE_SOS)		:= CFLAGS += -DUTF_32LE
78
79$(UCS_4_SOS)		:= CFLAGS += -DUCS_4
80$(UCS_4BE_SOS)		:= CFLAGS += -DUCS_4BE
81$(UCS_4LE_SOS)		:= CFLAGS += -DUCS_4LE
82
83$(UTF_8_SOS)		:= CFLAGS += -DUTF_8
84
85$(US_ASCII_SOS)		:= CFLAGS += -DUS_ASCII
86$(ISO_8859_1_SOS)	:= CFLAGS += -DISO_8859_1
87$(ISO_8859_2_SOS)	:= CFLAGS += -DISO_8859_2
88$(ISO_8859_3_SOS)	:= CFLAGS += -DISO_8859_3
89$(ISO_8859_4_SOS)	:= CFLAGS += -DISO_8859_4
90$(ISO_8859_5_SOS)	:= CFLAGS += -DISO_8859_5
91$(ISO_8859_6_SOS)	:= CFLAGS += -DISO_8859_6
92$(ISO_8859_7_SOS)	:= CFLAGS += -DISO_8859_7
93$(ISO_8859_8_SOS)	:= CFLAGS += -DISO_8859_8
94$(ISO_8859_9_SOS)	:= CFLAGS += -DISO_8859_9
95$(ISO_8859_10_SOS)	:= CFLAGS += -DISO_8859_10
96$(ISO_8859_13_SOS)	:= CFLAGS += -DISO_8859_13
97$(ISO_8859_14_SOS)	:= CFLAGS += -DISO_8859_14
98$(ISO_8859_15_SOS)	:= CFLAGS += -DISO_8859_15
99$(ISO_8859_16_SOS)	:= CFLAGS += -DISO_8859_16
100$(KOI8_R)		:= CFLAGS += -DKOI8_R
101$(KOI8_U)		:= CFLAGS += -DKOI8_U
102$(PTCP154)		:= CFLAGS += -DPTCP154
103$(CP437_SOS)		:= CFLAGS += -DCP437
104$(CP720_SOS)		:= CFLAGS += -DCP720
105$(CP737_SOS)		:= CFLAGS += -DCP737
106$(CP775_SOS)		:= CFLAGS += -DCP775
107$(CP850_SOS)		:= CFLAGS += -DCP850
108$(CP852_SOS)		:= CFLAGS += -DCP852
109$(CP855_SOS)		:= CFLAGS += -DCP855
110$(CP857_SOS)		:= CFLAGS += -DCP857
111$(CP860_SOS)		:= CFLAGS += -DCP860
112$(CP861_SOS)		:= CFLAGS += -DCP861
113$(CP862_SOS)		:= CFLAGS += -DCP862
114$(CP863_SOS)		:= CFLAGS += -DCP863
115$(CP864_SOS)		:= CFLAGS += -DCP864
116$(CP865_SOS)		:= CFLAGS += -DCP865
117$(CP866_SOS)		:= CFLAGS += -DCP866
118$(CP869_SOS)		:= CFLAGS += -DCP869
119$(CP874_SOS)		:= CFLAGS += -DCP874
120$(CP1250_SOS)		:= CFLAGS += -DCP1250
121$(CP1251_SOS)		:= CFLAGS += -DCP1251
122$(CP1252_SOS)		:= CFLAGS += -DCP1252
123$(CP1253_SOS)		:= CFLAGS += -DCP1253
124$(CP1254_SOS)		:= CFLAGS += -DCP1254
125$(CP1255_SOS)		:= CFLAGS += -DCP1255
126$(CP1256_SOS)		:= CFLAGS += -DCP1256
127$(CP1257_SOS)		:= CFLAGS += -DCP1257
128$(CP1258_SOS)		:= CFLAGS += -DCP1258
129
130$(ACE_TO_UTF_8_SO)	:= CFLAGS += -DICV_ACE_TO_UTF8
131$(ACE_ALLOW_UNAS_TO_UTF_8_SO)	:= CFLAGS += -DICV_ACE_TO_UTF8 \
132						-DICV_IDN_ALLOW_UNASSIGNED
133$(UTF_8_TO_ACE_SO)	:= CFLAGS += -DICV_UTF8_TO_ACE
134$(UTF_8_TO_ACE_ALLOW_UNAS_SO)	:= CFLAGS += -DICV_UTF8_TO_ACE \
135                                               -DICV_IDN_ALLOW_UNASSIGNED
136#
137# Dependencies and actual compilations are defined at below.
138$(SB_TO_UCS_SOS): $(COMMON)/common_defs.h $(COMMON)/sb_to_ucs.h $(COMMON)/sb_to_ucs.c
139	$(CC) $(CFLAGS) $(COMMON)/sb_to_ucs.c -c -o $@.o
140	$(CC) $(LDFLAGS) $(CFLAGS)  -o  $@ $@.o
141	$(POST_PROCESS_SO)
142
143$(UCS_TO_SB_SOS): $(COMMON)/common_defs.h $(COMMON)/ucs_to_sb.h $(COMMON)/ucs_to_sb.c
144	$(CC) $(CFLAGS) $(COMMON)/ucs_to_sb.c -c -o $@.o
145	$(CC) $(LDFLAGS) $(CFLAGS)  -o  $@ $@.o
146	$(POST_PROCESS_SO)
147
148$(SB_TO_UTF_8_SOS): $(COMMON)/common_defs.h $(COMMON)/sb_to_utf8.h $(COMMON)/sb_to_utf8.c
149	$(CC) $(CFLAGS) $(COMMON)/sb_to_utf8.c -c -o $@.o
150	$(CC) $(LDFLAGS) $(CFLAGS)  -o  $@ $@.o
151	$(POST_PROCESS_SO)
152
153$(UTF_8_TO_SB_SOS): $(COMMON)/common_defs.h $(COMMON)/utf8_to_sb.h $(COMMON)/utf8_to_sb.c
154	$(CC) $(CFLAGS) $(COMMON)/utf8_to_sb.c -c -o $@.o
155	$(CC) $(LDFLAGS) $(CFLAGS)  -o  $@ $@.o
156	$(POST_PROCESS_SO)
157
158$(UCS_4_TO_UCS_SOS): $(COMMON)/common_defs.h $(COMMON)/ucs4_to_ucs.h $(COMMON)/ucs4_to_ucs.c
159	$(CC) $(CFLAGS) $(COMMON)/ucs4_to_ucs.c -c -o $@.o
160	$(CC) $(LDFLAGS) $(CFLAGS)  -o  $@ $@.o
161	$(POST_PROCESS_SO)
162
163$(UCS_TO_UCS_4_SOS): $(COMMON)/common_defs.h $(COMMON)/ucs_to_ucs4.h $(COMMON)/ucs_to_ucs4.c
164	$(CC) $(CFLAGS) $(COMMON)/ucs_to_ucs4.c -c -o $@.o
165	$(CC) $(LDFLAGS) $(CFLAGS)  -o  $@ $@.o
166	$(POST_PROCESS_SO)
167
168$(UCS_4_TO_UTF_32_SOS): $(COMMON)/common_defs.h $(COMMON)/ucs4_to_ucs.h $(COMMON)/ucs4_to_ucs.c
169	$(CC) $(CFLAGS) $(COMMON)/ucs4_to_utf32.c -c -o $@.o
170	$(CC) $(LDFLAGS) $(CFLAGS)  -o  $@ $@.o
171	$(POST_PROCESS_SO)
172
173$(UTF_32_TO_UCS_4_SOS): $(COMMON)/common_defs.h $(COMMON)/ucs_to_ucs4.h $(COMMON)/ucs_to_ucs4.c
174	$(CC) $(CFLAGS) $(COMMON)/utf32_to_ucs4.c -c -o $@.o
175	$(CC) $(LDFLAGS) $(CFLAGS)  -o  $@ $@.o
176	$(POST_PROCESS_SO)
177
178$(UCS_TO_UTF_8_SOS): $(COMMON)/common_defs.h $(COMMON)/ucs_to_utf8.h $(COMMON)/ucs_to_utf8.c
179	$(CC) $(CFLAGS) $(COMMON)/ucs_to_utf8.c -c -o $@.o
180	$(CC) $(LDFLAGS) $(CFLAGS)  -o  $@ $@.o
181	$(POST_PROCESS_SO)
182
183$(UTF_8_TO_UCS_SOS): $(COMMON)/common_defs.h $(COMMON)/utf8_to_ucs.h $(COMMON)/utf8_to_ucs.c
184	$(CC) $(CFLAGS) $(COMMON)/utf8_to_ucs.c -c -o $@.o
185	$(CC) $(LDFLAGS) $(CFLAGS)  -o  $@ $@.o
186	$(POST_PROCESS_SO)
187
188$(UCS_TO_UTF_7_SOS): $(COMMON)/common_defs.h $(COMMON)/ucs_to_utf7.h $(COMMON)/ucs_to_utf7.c
189	$(CC) $(CFLAGS) $(COMMON)/ucs_to_utf7.c -c -o $@.o
190	$(CC) $(LDFLAGS) $(CFLAGS)  -o  $@ $@.o
191	$(POST_PROCESS_SO)
192
193$(UTF_7_TO_UCS_SOS): $(COMMON)/common_defs.h $(COMMON)/utf7_to_ucs.h $(COMMON)/utf7_to_ucs.c
194	$(CC) $(CFLAGS) $(COMMON)/utf7_to_ucs.c -c -o $@.o
195	$(CC) $(LDFLAGS) $(CFLAGS)  -o  $@ $@.o
196	$(POST_PROCESS_SO)
197
198$(UTF_8_TO_UTF_EBCDIC_SO): $(COMMON)/common_defs.h $(COMMON)/utf8_to_utf_ebcdic.h $(COMMON)/utf8_to_utf_ebcdic.c
199	$(CC) $(CFLAGS) $(COMMON)/utf8_to_utf_ebcdic.c -c -o $@.o
200	$(CC) $(LDFLAGS) $(CFLAGS)  -o  $@ $@.o
201	$(POST_PROCESS_SO)
202
203$(UTF_EBCDIC_TO_UTF_8_SO): $(COMMON)/common_defs.h $(COMMON)/utf_ebcdic_to_utf8.h $(COMMON)/utf_ebcdic_to_utf8.c
204	$(CC) $(CFLAGS) $(COMMON)/utf_ebcdic_to_utf8.c -c -o $@.o
205	$(CC) $(LDFLAGS) $(CFLAGS)  -o  $@ $@.o
206	$(POST_PROCESS_SO)
207
208$(ACE_TO_UTF_8_SO): $(COMMON)/ace.h $(COMMON)/ace_utf8.c
209	$(CC) $(CFLAGS) $(COMMON)/ace_utf8.c -c -o $@.o
210	$(CC) $(LDFLAGS) $(CFLAGS)  -o  $@ $@.o
211	$(POST_PROCESS_SO)
212
213$(ACE_ALLOW_UNAS_TO_UTF_8_SO): $(COMMON)/ace.h $(COMMON)/ace_utf8.c
214	$(CC) $(CFLAGS) $(COMMON)/ace_utf8.c -c -o $@.o
215	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $@.o
216	$(POST_PROCESS_SO)
217
218$(UTF_8_TO_ACE_SO): $(COMMON)/ace.h $(COMMON)/ace_utf8.c
219	$(CC) $(CFLAGS) $(COMMON)/ace_utf8.c -c -o $@.o
220	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $@.o
221	$(POST_PROCESS_SO)
222
223$(UTF_8_TO_ACE_ALLOW_UNAS_SO): $(COMMON)/ace.h $(COMMON)/ace_utf8.c
224	$(CC) $(CFLAGS) $(COMMON)/ace_utf8.c -c -o $@.o
225	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $@.o
226	$(POST_PROCESS_SO)
227
228$(UTF_8_TO_UTF_8_SO): $(COMMON)/common_defs.h $(COMMON)/utf8.c
229	$(CC) $(CFLAGS) $(COMMON)/utf8.c -c -o $@.o
230	$(CC) $(LDFLAGS) $(CFLAGS)  -o  $@ $@.o
231	$(POST_PROCESS_SO)
232