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