xref: /illumos-gate/usr/src/lib/iconv_modules/ko/Makefile.com (revision 6f1fa39e3cf1b335f342bbca41590e9d76ab29b7)
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 2006 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# Copyright (c) 2018, Joyent, Inc.
26
27
28include $(SRC)/lib/iconv_modules/Makefile.iconv
29
30install		:=	TARGET = install
31all		:=	TARGET = all
32clean		:=	TARGET = clean
33clobber		:=	TARGET = clobber
34
35dummy:	all
36
37COMMON  = ../common/
38ICONV_COMMON  = ../../common/
39
40SRCS    = byte_to_comb.c comb_to_byte.c \
41	euc_to_iso2022-7.c iso2022-7_to_euc.c \
42	euc_to_johap92.c johap92_to_euc.c \
43	euc_to_johap.c johap_to_euc.c \
44	euc_to_nbyte.c nbyte_to_euc.c \
45	uhang_to_utf_sub.c uhang_to_utf_main.c \
46	utf_to_uhang_sub.c utf_to_uhang_main.c \
47	unihan_to_UCS_sub.c unihan_to_UCS_main.c \
48	ucs_to_unihan.c \
49	\
50	euc_to_utf_main.c \
51	utf_to_euc_main.c \
52	njh_to_utf_main.c \
53	utf_to_njh_main.c \
54	ojh_to_utf_main.c \
55	utf_to_ojh_main.c \
56	iso_to_utf_main.c \
57	utf_to_iso_main.c
58
59
60E2I     = ko_KR-euc%ko_KR-iso2022-7.so
61I2E     = ko_KR-iso2022-7%ko_KR-euc.so
62E2J92   = ko_KR-euc%ko_KR-johap92.so
63J922E   = ko_KR-johap92%ko_KR-euc.so
64E2J     = ko_KR-euc%ko_KR-johap.so
65J2E     = ko_KR-johap%ko_KR-euc.so
66E2NB    = ko_KR-euc%ko_KR-nbyte.so
67NB2E    = ko_KR-nbyte%ko_KR-euc.so
68U2UH    = ko_KR-UTF-8%ko_KR-cp949.so
69UH2U    = ko_KR-cp949%ko_KR-UTF-8.so
70
71UCS2LE2UH = UCS-2LE%ko_KR-cp949.so
72UH2UCS2LE = ko_KR-cp949%UCS-2LE.so
73UCS2BE2UH = UCS-2BE%ko_KR-cp949.so
74UH2UCS2BE = ko_KR-cp949%UCS-2BE.so
75
76E2U     = ko_KR-euc%ko_KR-UTF-8.so
77U2E     = ko_KR-UTF-8%ko_KR-euc.so
78N2U     = ko_KR-johap92%ko_KR-UTF-8.so
79U2N     = ko_KR-UTF-8%ko_KR-johap92.so
80O2U     = ko_KR-johap%ko_KR-UTF-8.so
81U2O     = ko_KR-UTF-8%ko_KR-johap.so
82I2U     = ko_KR-iso2022-7%ko_KR-UTF-8.so
83U2I     = ko_KR-UTF-8%ko_KR-iso2022-7.so
84
85C9332U  = ko_KR-cp933%ko_KR-UTF-8.so
86U2C933  = ko_KR-UTF-8%ko_KR-cp933.so
87
88ALL_SOS   = $(E2I) $(I2E) $(E2J92) $(J922E) $(E2J) $(J2E) $(E2NB) $(NB2E) \
89	$(U2UH) $(UH2U) $(UH2UCS2LE) $(UCS2LE2UH) $(UH2UCS2BE) $(UCS2BE2UH) \
90	$(U2E) $(E2U) $(N2U) $(U2N) $(O2U) $(U2O) $(I2U) $(U2I) \
91	$(C9332U) $(U2C933)
92
93LDFLAGS = $(DYNFLAGS) $(LDLIBS) $(CFLAG_OPT)
94CPPFLAGS += -I$(ICONV_COMMON) -I../inc
95
96# needs work
97SMATCH=off
98
99LINK_TARGETS = $(U2UH) $(C9332U) $(UH2U) $(E2U) $(I2U) $(O2U) $(N2U) \
100	$(E2I) $(E2J) $(E2J92) $(E2NB) $(I2E) $(J2E) $(J922E) $(NVBE) \
101	$(UCS2BE2UH) $(U2LE2UH) $(U2C933) $(U2E) $(U2I) $(U2O) $(U2N) \
102	$(UH2UCS2BE) $(UH2UCS2LE)
103
104all: $(ALL_SOS)
105
106#
107# libraries
108#
109$(E2I): euc_to_iso2022-7.o
110	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ euc_to_iso2022-7.o
111	$(POST_PROCESS_SO)
112
113$(I2E): iso2022-7_to_euc.o
114	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ iso2022-7_to_euc.o
115	$(POST_PROCESS_SO)
116
117$(E2J92): euc_to_johap92.o ktable.o comp_to_pack.o c2p.o
118	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ comp_to_pack.o c2p.o euc_to_johap92.o ktable.o
119	$(POST_PROCESS_SO)
120
121$(J922E): johap92_to_euc.o ktable.o
122	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ johap92_to_euc.o ktable.o
123	$(POST_PROCESS_SO)
124
125$(E2J): euc_to_johap.o ktable.o comp_to_pack.o c2p.o
126	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ euc_to_johap.o ktable.o comp_to_pack.o c2p.o
127	$(POST_PROCESS_SO)
128
129$(J2E): johap_to_euc.o ktable.o pack_to_comp.o
130	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ johap_to_euc.o ktable.o pack_to_comp.o
131	$(POST_PROCESS_SO)
132
133$(E2NB): euc_to_nbyte.o comb_to_byte.o
134	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ euc_to_nbyte.o comb_to_byte.o c2p.o ktable.o
135	$(POST_PROCESS_SO)
136
137$(NB2E): nbyte_to_euc.o byte_to_comb.o
138	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ nbyte_to_euc.o byte_to_comb.o c2p.o ktable.o pack_to_comp.o
139	$(POST_PROCESS_SO)
140
141$(U2UH): utf_to_uhang_main.o utf_to_uhang_sub.o common_utf.o common_utf8.o $(COMMON)common_def.h
142	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ utf_to_uhang_main.o utf_to_uhang_sub.o common_utf.o common_utf8.o
143	$(POST_PROCESS_SO)
144
145$(UH2U): uhang_to_utf_main.o uhang_to_utf_sub.o common_utf.o $(COMMON)common_def.h
146	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ uhang_to_utf_main.o uhang_to_utf_sub.o common_utf.o
147	$(POST_PROCESS_SO)
148
149$(UH2UCS2LE) : unihan_to_UCS_sub.o unihan_to_UCS-2LE_main.o common_utf.o
150	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ unihan_to_UCS_sub.o unihan_to_UCS-2LE_main.o common_utf.o
151	$(POST_PROCESS_SO)
152
153$(UCS2LE2UH) : ucs_LE_to_unihan.o utf_to_uhang_sub.o common_utf.o
154	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ ucs_LE_to_unihan.o utf_to_uhang_sub.o common_utf.o
155	$(POST_PROCESS_SO)
156
157$(UH2UCS2BE) : unihan_to_UCS_sub.o unihan_to_UCS-2BE_main.o common_utf.o
158	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ unihan_to_UCS_sub.o unihan_to_UCS-2BE_main.o common_utf.o
159	$(POST_PROCESS_SO)
160
161$(UCS2BE2UH) : ucs_BE_to_unihan.o utf_to_uhang_sub.o common_utf.o
162	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ ucs_BE_to_unihan.o utf_to_uhang_sub.o common_utf.o
163	$(POST_PROCESS_SO)
164
165$(E2U): euc_to_utf_main.o euc_to_utf_sub.o common_utf.o $(COMMON)common_def.h
166	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ euc_to_utf_main.o euc_to_utf_sub.o common_utf.o
167	$(POST_PROCESS_SO)
168
169$(U2E): utf_to_euc_main.o utf_to_euc_sub.o common_utf.o common_utf8.o $(COMMON)common_def.h
170	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ utf_to_euc_main.o utf_to_euc_sub.o common_utf.o common_utf8.o
171	$(POST_PROCESS_SO)
172
173$(N2U): njh_to_utf_main.o njh_to_utf_sub.o common_utf.o $(COMMON)common_def.h
174	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ njh_to_utf_main.o njh_to_utf_sub.o common_utf.o
175	$(POST_PROCESS_SO)
176
177$(U2N): utf_to_njh_main.o utf_to_njh_sub.o common_utf.o common_utf8.o $(COMMON)common_def.h
178	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ utf_to_njh_main.o utf_to_njh_sub.o common_utf.o common_utf8.o
179	$(POST_PROCESS_SO)
180
181$(O2U): ojh_to_utf_main.o ojh_to_utf_sub.o common_utf.o $(COMMON)common_def.h
182	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ ojh_to_utf_main.o ojh_to_utf_sub.o common_utf.o
183	$(POST_PROCESS_SO)
184
185$(U2O): utf_to_ojh_main.o utf_to_ojh_sub.o common_utf.o common_utf8.o $(COMMON)common_def.h
186	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ utf_to_ojh_main.o utf_to_ojh_sub.o common_utf.o common_utf8.o
187	$(POST_PROCESS_SO)
188
189$(I2U): iso_to_utf_main.o euc_to_utf_sub.o common_utf.o $(COMMON)common_def.h
190	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ iso_to_utf_main.o euc_to_utf_sub.o common_utf.o
191	$(POST_PROCESS_SO)
192
193$(U2I): utf_to_iso_main.o utf_to_euc_sub.o common_utf.o common_utf8.o $(COMMON)common_def.h
194	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ utf_to_iso_main.o utf_to_euc_sub.o common_utf.o common_utf8.o
195	$(POST_PROCESS_SO)
196
197$(U2C933): UTF8_to_Cp933.o utf8%ibm.o tab_lookup.o $(ICONV_COMMON)tab_lookup.h
198	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ UTF8_to_Cp933.o utf8%ibm.o tab_lookup.o
199	$(POST_PROCESS_SO)
200
201$(C9332U): Cp933_to_UTF8.o ibm%utf8.o tab_lookup.o $(ICONV_COMMON)tab_lookup.h
202	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ Cp933_to_UTF8.o ibm%utf8.o tab_lookup.o
203	$(POST_PROCESS_SO)
204
205#
206# objs
207#
208common_utf8.o: $(ICONV_COMMON)common_utf8.c $(COMMON)common_def.h
209	$(CC) $(CPPFLAGS) -c $(CFLAGS) $(ICONV_COMMON)common_utf8.c -o $@
210	$(POST_PROCESS_O)
211
212ucs_LE_to_unihan.o : $(COMMON)ucs_to_unihan.c
213	$(CC) $(CPPFLAGS) -c $(CFLAGS) -DUCS_2LE $(COMMON)ucs_to_unihan.c -o $@
214	$(POST_PROCESS_O)
215
216ucs_BE_to_unihan.o : $(COMMON)ucs_to_unihan.c
217	$(CC) $(CPPFLAGS) -c $(CFLAGS) -DUCS_2BE $(COMMON)ucs_to_unihan.c -o $@
218	$(POST_PROCESS_O)
219
220unihan_to_UCS-2BE_main.o : $(COMMON)unihan_to_UCS_main.c
221	$(CC) $(CPPFLAGS) -c $(CFLAGS) -DUCS_2BE $(COMMON)unihan_to_UCS_main.c -o $@
222	$(POST_PROCESS_O)
223
224unihan_to_UCS-2LE_main.o : $(COMMON)unihan_to_UCS_main.c
225	$(CC) $(CPPFLAGS) -c $(CFLAGS) -DUCS_2LE $(COMMON)unihan_to_UCS_main.c -o $@
226	$(POST_PROCESS_O)
227
228ibm%utf8.o : $(ICONV_COMMON)ibm%utf8.c  $(COMMON)common_def.h
229	$(CC) $(CPPFLAGS) -c $(CFLAGS) $(ICONV_COMMON)ibm%utf8.c -o $@
230	$(POST_PROCESS_O)
231
232utf8%ibm.o: $(ICONV_COMMON)utf8%ibm.c $(COMMON)common_def.h
233	$(CC) $(CPPFLAGS) -c $(CFLAGS) $(ICONV_COMMON)utf8%ibm.c -o $@
234	$(POST_PROCESS_O)
235
236cnv_utf8ibm.o: $(ICONV_COMMON)cnv_utf8ibm.c $(ICONV_COMMON)tab_lookup.h
237	$(CC) $(CPPFLAGS) -c $(CFLAGS) $(ICONV_COMMON)cnv_utf8ibm.c -o $@
238	$(POST_PROCESS_O)
239
240cnv_ibmutf8.o: $(ICONV_COMMON)cnv_ibmutf8.c $(ICONV_COMMON)tab_lookup.h
241	$(CC) $(CPPFLAGS) -c $(CFLAGS) $(ICONV_COMMON)cnv_ibmutf8.c -o $@
242	$(POST_PROCESS_O)
243
244tab_lookup.o: $(ICONV_COMMON)tab_lookup.c $(ICONV_COMMON)tab_lookup.h
245	$(CC) $(CPPFLAGS) -c $(CFLAGS) $(ICONV_COMMON)tab_lookup.c -o $@
246	$(POST_PROCESS_O)
247
248Cp933_to_UTF8.o: $(COMMON)Cp933_to_UTF8.c $(ICONV_COMMON)tab_lookup.h  $(COMMON)cp933_ucs2.h
249	$(CC) $(CPPFLAGS) -c $(CFLAGS) $(COMMON)Cp933_to_UTF8.c -o $@
250	$(POST_PROCESS_O)
251
252UTF8_to_Cp933.o: $(COMMON)UTF8_to_Cp933.c $(ICONV_COMMON)tab_lookup.h $(COMMON)ucs2_cp933.h
253	$(CC) $(CPPFLAGS) -c $(CFLAGS) $(COMMON)UTF8_to_Cp933.c -o $@
254	$(POST_PROCESS_O)
255
256#
257# Proto area symlinks
258#
259$(CREATE_LINKS):	$(ICONV_LINK_TARGETS)
260	$(SYMLINK) -f ko_KR-UTF-8%ko_KR-cp949.so $(ICONV_DIR)/ko_KR-UTF-8%UnifiedHangul.so
261	$(SYMLINK) -f ko_KR-cp933%ko_KR-UTF-8.so $(ICONV_DIR)/ko_KR-cp933%UTF-8.so
262	$(SYMLINK) -f ko_KR-cp949%ko_KR-UTF-8.so $(ICONV_DIR)/ko_KR-cp949%UTF-8.so
263	$(SYMLINK) -f ko_KR-euc%ko_KR-UTF-8.so $(ICONV_DIR)/ko_KR-euc%UTF-8.so
264	$(SYMLINK) -f ko_KR-iso2022-7%ko_KR-UTF-8.so $(ICONV_DIR)/ko_KR-iso2022-7%UTF-8.so
265	$(SYMLINK) -f ko_KR-johap%ko_KR-UTF-8.so $(ICONV_DIR)/ko_KR-johap%UTF-8.so
266	$(SYMLINK) -f ko_KR-johap92%ko_KR-UTF-8.so $(ICONV_DIR)/ko_KR-johap92%UTF-8.so
267	$(SYMLINK) -f ko_KR-euc%ko_KR-UTF-8.so $(ICONV_DIR)/ko_KR.EUC%UTF-8.so
268	$(SYMLINK) -f ko_KR-cp933%ko_KR-UTF-8.so $(ICONV_DIR)/ko_KR.cp933%UTF-8.so
269	$(SYMLINK) -f ko_KR-cp949%ko_KR-UTF-8.so $(ICONV_DIR)/ko_KR.cp949%UTF-8.so
270	$(SYMLINK) -f ko_KR-euc%ko_KR-UTF-8.so $(ICONV_DIR)/ko_KR.euc%UTF-8.so
271	$(SYMLINK) -f ko_KR-euc%ko_KR-iso2022-7.so $(ICONV_DIR)/ko_KR.euc%ko_KR.iso2022-7.so
272	$(SYMLINK) -f ko_KR-euc%ko_KR-johap.so $(ICONV_DIR)/ko_KR.euc%ko_KR.johap.so
273	$(SYMLINK) -f ko_KR-euc%ko_KR-johap92.so $(ICONV_DIR)/ko_KR.euc%ko_KR.johap92.so
274	$(SYMLINK) -f ko_KR-euc%ko_KR-nbyte.so $(ICONV_DIR)/ko_KR.euc%ko_KR.nbyte.so
275	$(SYMLINK) -f ko_KR-iso2022-7%ko_KR-UTF-8.so $(ICONV_DIR)/ko_KR.iso2022-7%UTF-8.so
276	$(SYMLINK) -f ko_KR-iso2022-7%ko_KR-euc.so $(ICONV_DIR)/ko_KR.iso2022-7%ko_KR.euc.so
277	$(SYMLINK) -f ko_KR-johap%ko_KR-UTF-8.so $(ICONV_DIR)/ko_KR.johap%UTF-8.so
278	$(SYMLINK) -f ko_KR-johap%ko_KR-euc.so $(ICONV_DIR)/ko_KR.johap%ko_KR.euc.so
279	$(SYMLINK) -f ko_KR-johap92%ko_KR-UTF-8.so $(ICONV_DIR)/ko_KR.johap92%UTF-8.so
280	$(SYMLINK) -f ko_KR-johap92%ko_KR-euc.so $(ICONV_DIR)/ko_KR.johap92%ko_KR.euc.so
281	$(SYMLINK) -f ko_KR-nbyte%ko_KR-euc.so $(ICONV_DIR)/ko_KR.nbyte%ko_KR.euc.so
282	$(SYMLINK) -f ko_KR-cp949%UCS-2BE.so $(ICONV_DIR)/5601%UCS-2BE.so
283	$(SYMLINK) -f ko_KR-cp949%UCS-2LE.so $(ICONV_DIR)/5601%UCS-2LE.so
284	$(SYMLINK) -f ko_KR-euc%ko_KR-UTF-8.so $(ICONV_DIR)/5601%UTF-8.so
285	$(SYMLINK) -f ko_KR-euc%ko_KR-UTF-8.so $(ICONV_DIR)/EUC-KR%UTF-8.so
286	$(SYMLINK) -f ko_KR-iso2022-7%ko_KR-UTF-8.so $(ICONV_DIR)/ISO-2022-KR%UTF-8.so
287	$(SYMLINK) -f ko_KR-euc%ko_KR-UTF-8.so $(ICONV_DIR)/KSC5601%UTF-8.so
288	$(SYMLINK) -f ko_KR-euc%ko_KR-UTF-8.so $(ICONV_DIR)/KSX1001%UTF-8.so
289	$(SYMLINK) -f UCS-2BE%ko_KR-cp949.so $(ICONV_DIR)/UCS-2BE%5601.so
290	$(SYMLINK) -f UCS-2LE%ko_KR-cp949.so $(ICONV_DIR)/UCS-2LE%5601.so
291	$(SYMLINK) -f ko_KR-UTF-8%ko_KR-euc.so $(ICONV_DIR)/UTF-8%5601.so
292	$(SYMLINK) -f ko_KR-UTF-8%ko_KR-euc.so $(ICONV_DIR)/UTF-8%EUC-KR.so
293	$(SYMLINK) -f ko_KR-UTF-8%ko_KR-iso2022-7.so $(ICONV_DIR)/UTF-8%ISO-2022-KR.so
294	$(SYMLINK) -f ko_KR-UTF-8%ko_KR-euc.so $(ICONV_DIR)/UTF-8%KSC5601.so
295	$(SYMLINK) -f ko_KR-UTF-8%ko_KR-euc.so $(ICONV_DIR)/UTF-8%KSX1001.so
296	$(SYMLINK) -f ko_KR-UTF-8%ko_KR-cp933.so $(ICONV_DIR)/UTF-8%ko_KR-cp933.so
297	$(SYMLINK) -f ko_KR-UTF-8%ko_KR-cp949.so $(ICONV_DIR)/UTF-8%ko_KR-cp949.so
298	$(SYMLINK) -f ko_KR-UTF-8%ko_KR-euc.so $(ICONV_DIR)/UTF-8%ko_KR-euc.so
299	$(SYMLINK) -f ko_KR-UTF-8%ko_KR-iso2022-7.so $(ICONV_DIR)/UTF-8%ko_KR-iso2022-7.so
300	$(SYMLINK) -f ko_KR-UTF-8%ko_KR-johap.so $(ICONV_DIR)/UTF-8%ko_KR-johap.so
301	$(SYMLINK) -f ko_KR-UTF-8%ko_KR-johap92.so $(ICONV_DIR)/UTF-8%ko_KR-johap92.so
302	$(SYMLINK) -f ko_KR-UTF-8%ko_KR-euc.so $(ICONV_DIR)/UTF-8%ko_KR.EUC.so
303	$(SYMLINK) -f ko_KR-UTF-8%ko_KR-cp933.so $(ICONV_DIR)/UTF-8%ko_KR.cp933.so
304	$(SYMLINK) -f ko_KR-UTF-8%ko_KR-cp949.so $(ICONV_DIR)/UTF-8%ko_KR.cp949.so
305	$(SYMLINK) -f ko_KR-UTF-8%ko_KR-euc.so $(ICONV_DIR)/UTF-8%ko_KR.euc.so
306	$(SYMLINK) -f ko_KR-UTF-8%ko_KR-iso2022-7.so $(ICONV_DIR)/UTF-8%ko_KR.iso2022-7.so
307	$(SYMLINK) -f ko_KR-UTF-8%ko_KR-johap.so $(ICONV_DIR)/UTF-8%ko_KR.johap.so
308	$(SYMLINK) -f ko_KR-UTF-8%ko_KR-johap92.so $(ICONV_DIR)/UTF-8%ko_KR.johap92.so
309	$(SYMLINK) -f ko_KR-cp949%ko_KR-UTF-8.so $(ICONV_DIR)/UnifiedHangul%ko_KR-UTF-8.so
310	$(TOUCH) $@
311FRC:
312