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 26 27CODESETS = IBM-037 IBM-273 IBM-277 IBM-278 IBM-280 IBM-284 IBM-285 IBM-297 \ 28IBM-420 IBM-424 IBM-500 \ 29IBM-850 IBM-852 IBM-855 IBM-856 IBM-857 IBM-862 IBM-864 IBM-866 IBM-869 \ 30IBM-870 IBM-875 IBM-880 \ 31IBM-921 IBM-922 IBM-1025 IBM-1026 IBM-1046 IBM-1112 \ 32CP850 CP852 CP855 CP857 CP862 CP864 CP869 CP866\ 33CP874 \ 34CP1250 CP1251 CP1252 CP1253 CP1254 CP1255 CP1256 CP1257 CP1258 IBM-1122 35 36 37OUT1 = $(CODESETS:%=%.out1) 38OUT2 = $(CODESETS:%=%.out2) 39MNMC = $(CODESETS:%=%.mnmc) 40 41OUTE = UTF-EBCDIC.out2 42 43MNCSPRS = IBM-273.mnmc IBM-277.mnmc IBM-278.mnmc IBM-280.mnmc IBM-284.mnmc \ 44IBM-285.mnmc IBM-297.mnmc IBM-420.mnmc IBM-424.mnmc \ 45IBM-850.mnmc IBM-852.mnmc IBM-855.mnmc IBM-857.mnmc IBM-862.mnmc IBM-864.mnmc \ 46IBM-870.mnmc IBM-880.mnmc \ 47IBM-1026.mnmc 48 49CFLAGS += -g 50 51SB_TO_UTF8_TEST = sb_to_utf8_test 52UTF8_TO_EBCDIC_TEST = utf8_to_ebcdic_test 53MKMNMCSTBL = mkmnmcstbl 54 55OBJECTS = $(SB_TO_UTF8_TEST) $(UTF8_TO_EBCDIC_TEST) $(MKMNMCSTBL) 56 57test: $(OBJECTS) $(OUT1) $(OUT2) $(OUTE) 58 59mn: $(MNMC) 60 61 62clean: 63 -rm $(OUT1) $(OUT2) $(OUTE) 64clobber: clean 65 -rm $(OBJECTS) 66 67 68test1: $(OUT1) 69test2: $(OUT2) 70 71ebcdic: $(OUTE) 72 73 74UTF%.out2: UTF% 75 $(UTF8_TO_EBCDIC_TEST) $< > $@ 76 77 78.SUFFIXES: $(SUFFIXES) .out 79.PRECIOUS: %.out 80 81%.out1: % 82 $(SB_TO_UTF8_TEST) -c ../util $< > $@ 83# $(SB_TO_UTF8_TEST) $< > $@ 84 85%.out2: % 86 $(UTF8_TO_EBCDIC_TEST) $< > $@ 87 88%.mnmc: %.txt 89 $(MKMNMCSTBL) mnemonics.txt < ../util/$< > $@ 90 91UTF-EBCDIC.out2: UTF-EBCDIC 92 $(UTF8_TO_EBCDIC_TEST) UTF-EBCDIC > $@ 93# $(UTF8_TO_EBCDIC_TEST) -b -d UTF-EBCDIC > $@.big 94 95 96 97 98%_test:%_test.c 99 $(CC) $(CFLAGS) -o $@ $< $(LDLIBS) 100%tbl:%tbl.c 101 $(CC) $(CFLAGS) -o $@ $< $(LDLIBS) 102 103mnpr: 104 pr $(MNCSPRS) | lp 105 106%: FRC 107 108 109FRC: 110 111# 112$(OUT1): $(SB_TO_UTF8_TEST) 113$(OUT2) $(OUTE) :$(UTF8_TO_EBCDIC_TEST) 114$(MNMC): $(MKMNMCSTBL) 115