xref: /illumos-gate/usr/src/lib/iconv_modules/ja/Makefile.iconv (revision 8459c777fc1aaabb2f7dad05de1313aa169417cd)
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# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
22# Use is subject to license terms.
23#
24
25SRCDIR=			.
26
27# Real modules without .so suffix
28MODULES_all=
29MODULES_base_source= \
30		UTF-8_TO_ISO-2022-JP	ISO-2022-JP_TO_UTF-8 \
31		UTF-8_TO_ISO-2022-JP.RFC1468 \
32		UTF-8-Java_TO_eucJP	eucJP_TO_UTF-8-Java \
33		UTF-8-Java_TO_PCK	PCK_TO_UTF-8-Java \
34		UTF-8_TO_UTF-8-ms932	UTF-8-ms932_TO_UTF-8 \
35		eucJP_TO_PCK		PCK_TO_eucJP \
36		eucJP_TO_ISO-2022-JP	ISO-2022-JP_TO_eucJP \
37		eucJP_TO_ISO-2022-JP.RFC1468 \
38		eucJP_TO_jis		jis_TO_eucJP \
39		PCK_TO_ISO-2022-JP	ISO-2022-JP_TO_PCK \
40		PCK_TO_ISO-2022-JP.RFC1468 \
41		PCK_TO_jis		jis_TO_PCK \
42		$(MODULES_uni)
43
44MODULES_uni= \
45	$(MODULES_uni_locale) \
46	$(MODULES_uni_ms) \
47	$(MODULES_uni_x0213)
48
49MODULES_uni_locale= \
50		eucJP_TO_UTF-8 \
51		eucJP_TO_UTF-16 \
52		eucJP_TO_UTF-16BE \
53		eucJP_TO_UTF-16LE \
54		eucJP_TO_UCS-2 \
55		eucJP_TO_UCS-2BE \
56		eucJP_TO_UCS-2LE \
57		eucJP_TO_UTF-32 \
58		eucJP_TO_UTF-32BE \
59		eucJP_TO_UTF-32LE \
60		UTF-8_TO_eucJP \
61		UTF-16_TO_eucJP \
62		UTF-16BE_TO_eucJP \
63		UTF-16LE_TO_eucJP \
64		UCS-2_TO_eucJP \
65		UCS-2BE_TO_eucJP \
66		UCS-2LE_TO_eucJP \
67		UTF-32_TO_eucJP \
68		UTF-32BE_TO_eucJP \
69		UTF-32LE_TO_eucJP \
70		PCK_TO_UTF-8 \
71		PCK_TO_UTF-16 \
72		PCK_TO_UTF-16BE \
73		PCK_TO_UTF-16LE \
74		PCK_TO_UCS-2 \
75		PCK_TO_UCS-2BE \
76		PCK_TO_UCS-2LE \
77		PCK_TO_UTF-32 \
78		PCK_TO_UTF-32BE \
79		PCK_TO_UTF-32LE \
80		UTF-8_TO_PCK \
81		UTF-16_TO_PCK \
82		UTF-16BE_TO_PCK \
83		UTF-16LE_TO_PCK \
84		UCS-2_TO_PCK \
85		UCS-2BE_TO_PCK \
86		UCS-2LE_TO_PCK \
87		UTF-32_TO_PCK \
88		UTF-32BE_TO_PCK \
89		UTF-32LE_TO_PCK
90
91MODULES_uni_ms= \
92		eucJP-ms_TO_UTF-8 \
93		eucJP-ms_TO_UTF-16 \
94		eucJP-ms_TO_UTF-16BE \
95		eucJP-ms_TO_UTF-16LE \
96		eucJP-ms_TO_UCS-2 \
97		eucJP-ms_TO_UCS-2BE \
98		eucJP-ms_TO_UCS-2LE \
99		eucJP-ms_TO_UTF-32 \
100		eucJP-ms_TO_UTF-32BE \
101		eucJP-ms_TO_UTF-32LE \
102		UTF-8_TO_eucJP-ms \
103		UTF-16_TO_eucJP-ms \
104		UTF-16BE_TO_eucJP-ms \
105		UTF-16LE_TO_eucJP-ms \
106		UCS-2_TO_eucJP-ms \
107		UCS-2BE_TO_eucJP-ms \
108		UCS-2LE_TO_eucJP-ms \
109		UTF-32_TO_eucJP-ms \
110		UTF-32BE_TO_eucJP-ms \
111		UTF-32LE_TO_eucJP-ms \
112		ms932_TO_UTF-8 \
113		ms932_TO_UTF-16 \
114		ms932_TO_UTF-16BE \
115		ms932_TO_UTF-16LE \
116		ms932_TO_UCS-2 \
117		ms932_TO_UCS-2BE \
118		ms932_TO_UCS-2LE \
119		ms932_TO_UTF-32 \
120		ms932_TO_UTF-32BE \
121		ms932_TO_UTF-32LE \
122		UTF-8_TO_ms932 \
123		UTF-16_TO_ms932 \
124		UTF-16BE_TO_ms932 \
125		UTF-16LE_TO_ms932 \
126		UCS-2_TO_ms932 \
127		UCS-2BE_TO_ms932 \
128		UCS-2LE_TO_ms932 \
129		UTF-32_TO_ms932 \
130		UTF-32BE_TO_ms932 \
131		UTF-32LE_TO_ms932
132
133MODULES_uni_x0213= \
134		EUC-JIS-2004_TO_UTF-8 \
135		EUC-JIS-2004_TO_UTF-16 \
136		EUC-JIS-2004_TO_UTF-16BE \
137		EUC-JIS-2004_TO_UTF-16LE \
138		EUC-JIS-2004_TO_UCS-2 \
139		EUC-JIS-2004_TO_UCS-2BE \
140		EUC-JIS-2004_TO_UCS-2LE \
141		EUC-JIS-2004_TO_UTF-32 \
142		EUC-JIS-2004_TO_UTF-32BE \
143		EUC-JIS-2004_TO_UTF-32LE \
144		UTF-8_TO_EUC-JIS-2004 \
145		UTF-16_TO_EUC-JIS-2004 \
146		UTF-16BE_TO_EUC-JIS-2004 \
147		UTF-16LE_TO_EUC-JIS-2004 \
148		UCS-2_TO_EUC-JIS-2004 \
149		UCS-2BE_TO_EUC-JIS-2004 \
150		UCS-2LE_TO_EUC-JIS-2004 \
151		UTF-32_TO_EUC-JIS-2004 \
152		UTF-32BE_TO_EUC-JIS-2004 \
153		UTF-32LE_TO_EUC-JIS-2004 \
154		Shift_JIS-2004_TO_UTF-8 \
155		Shift_JIS-2004_TO_UTF-16 \
156		Shift_JIS-2004_TO_UTF-16BE \
157		Shift_JIS-2004_TO_UTF-16LE \
158		Shift_JIS-2004_TO_UCS-2 \
159		Shift_JIS-2004_TO_UCS-2BE \
160		Shift_JIS-2004_TO_UCS-2LE \
161		Shift_JIS-2004_TO_UTF-32 \
162		Shift_JIS-2004_TO_UTF-32BE \
163		Shift_JIS-2004_TO_UTF-32LE \
164		UTF-8_TO_Shift_JIS-2004 \
165		UTF-16_TO_Shift_JIS-2004 \
166		UTF-16BE_TO_Shift_JIS-2004 \
167		UTF-16LE_TO_Shift_JIS-2004 \
168		UCS-2_TO_Shift_JIS-2004 \
169		UCS-2BE_TO_Shift_JIS-2004 \
170		UCS-2LE_TO_Shift_JIS-2004 \
171		UTF-32_TO_Shift_JIS-2004 \
172		UTF-32BE_TO_Shift_JIS-2004 \
173		UTF-32LE_TO_Shift_JIS-2004 \
174		ISO-2022-JP-2004_TO_UTF-8 \
175		ISO-2022-JP-2004_TO_UTF-16 \
176		ISO-2022-JP-2004_TO_UTF-16BE \
177		ISO-2022-JP-2004_TO_UTF-16LE \
178		ISO-2022-JP-2004_TO_UCS-2 \
179		ISO-2022-JP-2004_TO_UCS-2BE \
180		ISO-2022-JP-2004_TO_UCS-2LE \
181		ISO-2022-JP-2004_TO_UTF-32 \
182		ISO-2022-JP-2004_TO_UTF-32BE \
183		ISO-2022-JP-2004_TO_UTF-32LE \
184		UTF-8_TO_ISO-2022-JP-2004 \
185		UTF-16_TO_ISO-2022-JP-2004 \
186		UTF-16BE_TO_ISO-2022-JP-2004 \
187		UTF-16LE_TO_ISO-2022-JP-2004 \
188		UCS-2_TO_ISO-2022-JP-2004 \
189		UCS-2BE_TO_ISO-2022-JP-2004 \
190		UCS-2LE_TO_ISO-2022-JP-2004 \
191		UTF-32_TO_ISO-2022-JP-2004 \
192		UTF-32BE_TO_ISO-2022-JP-2004 \
193		UTF-32LE_TO_ISO-2022-JP-2004
194
195MODULES_jfp_source=
196
197MODULES32_base_source= $(MODULES_base_source)
198MODULES64_base_source= $(MODULES_base_source)
199MODULES32_jfp_source=  $(MODULES_jfp_source)
200MODULES64_jfp_source=  $(MODULES_jfp_source)
201MODULES=	$(MODULES_all) $(MODULES32_base_source) $(MODULES32_jfp_source)
202MODULES64=	$(MODULES64_base_source) $(MODULES64_jfp_source)
203
204# extra macro definitions (-D) and extra include file search paths (-I)
205
206ICONV_DEFS=
207
208eucJP_TO_UTF-8-Java.o  \
209UTF-8-Java_TO_eucJP.o  \
210PCK_TO_UTF-8-Java.o  \
211UTF-8-Java_TO_PCK.o  \
212	:= ICONV_DEFS +=	-DJAVA_CONV_COMPAT
213
214$(MODULES_uni_ms:%=%.o) \
215	:= ICONV_DEFS +=	-DJFP_ICONV_MS932
216
217UTF-8_TO_ISO-2022-JP.RFC1468.o  \
218eucJP_TO_ISO-2022-JP.RFC1468.o  \
219PCK_TO_ISO-2022-JP.RFC1468.o  \
220	:= ICONV_DEFS +=	-DRFC1468_MODE
221
222UTF-16_TO_eucJP.o  \
223UTF-16_TO_PCK.o  \
224UTF-16_TO_eucJP-ms.o  \
225UTF-16_TO_ms932.o  \
226UTF-16_TO_EUC-JIS-2004.o  \
227UTF-16_TO_Shift_JIS-2004.o  \
228UTF-16_TO_ISO-2022-JP-2004.o  \
229	:= ICONV_DEFS +=	-DJFP_ICONV_FROMCODE_UTF16
230
231UTF-16BE_TO_eucJP.o  \
232UTF-16BE_TO_PCK.o  \
233UTF-16BE_TO_eucJP-ms.o  \
234UTF-16BE_TO_ms932.o  \
235UTF-16BE_TO_EUC-JIS-2004.o  \
236UTF-16BE_TO_Shift_JIS-2004.o  \
237UTF-16BE_TO_ISO-2022-JP-2004.o  \
238	:= ICONV_DEFS +=	-DJFP_ICONV_FROMCODE_UTF16BE
239
240UTF-16LE_TO_eucJP.o  \
241UTF-16LE_TO_PCK.o  \
242UTF-16LE_TO_eucJP-ms.o  \
243UTF-16LE_TO_ms932.o  \
244UTF-16LE_TO_EUC-JIS-2004.o  \
245UTF-16LE_TO_Shift_JIS-2004.o  \
246UTF-16LE_TO_ISO-2022-JP-2004.o  \
247	:= ICONV_DEFS +=	-DJFP_ICONV_FROMCODE_UTF16LE
248
249UCS-2_TO_eucJP.o  \
250UCS-2_TO_PCK.o  \
251UCS-2_TO_eucJP-ms.o  \
252UCS-2_TO_ms932.o  \
253UCS-2_TO_EUC-JIS-2004.o  \
254UCS-2_TO_Shift_JIS-2004.o  \
255UCS-2_TO_ISO-2022-JP-2004.o  \
256	:= ICONV_DEFS +=	-DJFP_ICONV_FROMCODE_UCS2
257
258UCS-2BE_TO_eucJP.o  \
259UCS-2BE_TO_PCK.o  \
260UCS-2BE_TO_eucJP-ms.o  \
261UCS-2BE_TO_ms932.o  \
262UCS-2BE_TO_EUC-JIS-2004.o  \
263UCS-2BE_TO_Shift_JIS-2004.o  \
264UCS-2BE_TO_ISO-2022-JP-2004.o  \
265	:= ICONV_DEFS +=	-DJFP_ICONV_FROMCODE_UCS2BE
266
267UCS-2LE_TO_eucJP.o  \
268UCS-2LE_TO_PCK.o  \
269UCS-2LE_TO_eucJP-ms.o  \
270UCS-2LE_TO_ms932.o  \
271UCS-2LE_TO_EUC-JIS-2004.o  \
272UCS-2LE_TO_Shift_JIS-2004.o  \
273UCS-2LE_TO_ISO-2022-JP-2004.o  \
274	:= ICONV_DEFS +=	-DJFP_ICONV_FROMCODE_UCS2LE
275
276UTF-32_TO_eucJP.o  \
277UTF-32_TO_PCK.o  \
278UTF-32_TO_eucJP-ms.o  \
279UTF-32_TO_ms932.o  \
280UTF-32_TO_EUC-JIS-2004.o  \
281UTF-32_TO_Shift_JIS-2004.o  \
282UTF-32_TO_ISO-2022-JP-2004.o  \
283	:= ICONV_DEFS +=	-DJFP_ICONV_FROMCODE_UTF32
284
285UTF-32BE_TO_eucJP.o  \
286UTF-32BE_TO_PCK.o  \
287UTF-32BE_TO_eucJP-ms.o  \
288UTF-32BE_TO_ms932.o  \
289UTF-32BE_TO_EUC-JIS-2004.o  \
290UTF-32BE_TO_Shift_JIS-2004.o  \
291UTF-32BE_TO_ISO-2022-JP-2004.o  \
292	:= ICONV_DEFS +=	-DJFP_ICONV_FROMCODE_UTF32BE
293
294UTF-32LE_TO_eucJP.o  \
295UTF-32LE_TO_PCK.o  \
296UTF-32LE_TO_eucJP-ms.o  \
297UTF-32LE_TO_ms932.o  \
298UTF-32LE_TO_EUC-JIS-2004.o  \
299UTF-32LE_TO_Shift_JIS-2004.o  \
300UTF-32LE_TO_ISO-2022-JP-2004.o  \
301	:= ICONV_DEFS +=	-DJFP_ICONV_FROMCODE_UTF32LE
302
303eucJP_TO_UTF-16.o  \
304PCK_TO_UTF-16.o  \
305eucJP-ms_TO_UTF-16.o  \
306ms932_TO_UTF-16.o  \
307EUC-JIS-2004_TO_UTF-16.o  \
308Shift_JIS-2004_TO_UTF-16.o  \
309ISO-2022-JP-2004_TO_UTF-16.o  \
310	:= ICONV_DEFS +=	-DJFP_ICONV_TOCODE_UTF16
311
312eucJP_TO_UTF-16BE.o  \
313PCK_TO_UTF-16BE.o  \
314eucJP-ms_TO_UTF-16BE.o  \
315ms932_TO_UTF-16BE.o  \
316EUC-JIS-2004_TO_UTF-16BE.o  \
317Shift_JIS-2004_TO_UTF-16BE.o  \
318ISO-2022-JP-2004_TO_UTF-16BE.o  \
319	:= ICONV_DEFS +=	-DJFP_ICONV_TOCODE_UTF16BE
320
321eucJP_TO_UTF-16LE.o  \
322PCK_TO_UTF-16LE.o  \
323eucJP-ms_TO_UTF-16LE.o  \
324ms932_TO_UTF-16LE.o  \
325EUC-JIS-2004_TO_UTF-16LE.o  \
326Shift_JIS-2004_TO_UTF-16LE.o  \
327ISO-2022-JP-2004_TO_UTF-16LE.o  \
328	:= ICONV_DEFS +=	-DJFP_ICONV_TOCODE_UTF16LE
329
330eucJP_TO_UCS-2.o  \
331PCK_TO_UCS-2.o  \
332eucJP-ms_TO_UCS-2.o  \
333ms932_TO_UCS-2.o  \
334EUC-JIS-2004_TO_UCS-2.o  \
335Shift_JIS-2004_TO_UCS-2.o  \
336ISO-2022-JP-2004_TO_UCS-2.o  \
337	:= ICONV_DEFS +=	-DJFP_ICONV_TOCODE_UCS2
338
339eucJP_TO_UCS-2BE.o  \
340PCK_TO_UCS-2BE.o  \
341eucJP-ms_TO_UCS-2BE.o  \
342ms932_TO_UCS-2BE.o  \
343EUC-JIS-2004_TO_UCS-2BE.o  \
344Shift_JIS-2004_TO_UCS-2BE.o  \
345ISO-2022-JP-2004_TO_UCS-2BE.o  \
346	:= ICONV_DEFS +=	-DJFP_ICONV_TOCODE_UCS2BE
347
348eucJP_TO_UCS-2LE.o  \
349PCK_TO_UCS-2LE.o  \
350eucJP-ms_TO_UCS-2LE.o  \
351ms932_TO_UCS-2LE.o  \
352EUC-JIS-2004_TO_UCS-2LE.o  \
353Shift_JIS-2004_TO_UCS-2LE.o  \
354ISO-2022-JP-2004_TO_UCS-2LE.o  \
355	:= ICONV_DEFS +=	-DJFP_ICONV_TOCODE_UCS2LE
356
357eucJP_TO_UTF-32.o  \
358PCK_TO_UTF-32.o  \
359eucJP-ms_TO_UTF-32.o  \
360ms932_TO_UTF-32.o  \
361EUC-JIS-2004_TO_UTF-32.o  \
362Shift_JIS-2004_TO_UTF-32.o  \
363ISO-2022-JP-2004_TO_UTF-32.o  \
364	:= ICONV_DEFS +=	-DJFP_ICONV_TOCODE_UTF32
365
366eucJP_TO_UTF-32BE.o  \
367PCK_TO_UTF-32BE.o  \
368eucJP-ms_TO_UTF-32BE.o  \
369ms932_TO_UTF-32BE.o  \
370EUC-JIS-2004_TO_UTF-32BE.o  \
371Shift_JIS-2004_TO_UTF-32BE.o  \
372ISO-2022-JP-2004_TO_UTF-32BE.o  \
373	:= ICONV_DEFS +=	-DJFP_ICONV_TOCODE_UTF32BE
374
375eucJP_TO_UTF-32LE.o  \
376PCK_TO_UTF-32LE.o  \
377eucJP-ms_TO_UTF-32LE.o  \
378ms932_TO_UTF-32LE.o  \
379EUC-JIS-2004_TO_UTF-32LE.o  \
380Shift_JIS-2004_TO_UTF-32LE.o  \
381ISO-2022-JP-2004_TO_UTF-32LE.o  \
382	:= ICONV_DEFS +=	-DJFP_ICONV_TOCODE_UTF32LE
383
384DYNOBJS=	$(MODULES:%=%.so)
385DYNOBJS64=	$(MODULES64:%=%.so)
386OBJECTS=	$(MODULES:%=%.o)
387SRCS=		$(MODULES:%=%.c)
388
389LDFLAGS +=	$(GSHARED)
390CFLAGS +=	-D_REENTRANT $(ICONV_DEFS) -I. $(XREGSFLAG)
391CFLAGS64 +=	-D_REENTRANT $(ICONV_DEFS) -I. $(XREGSFLAG64)
392FILEMODE =	755
393
394
395# jfp_iconv_unicode.h contains definition of static functions
396# which are used by some modules, but not all functions are used
397# by all modules
398CERRWARN += -_gcc=-Wno-unused-function
399