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