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 (c) 2010, Oracle and/or its affiliates. All rights reserved.
23#
24
25include $(SRC)/Makefile.master
26
27
28# let the .so compilation be driven by present recoding tables
29TABLES:sh =	cd ../tbls/ && ls *tbl
30
31ALL_SOS:sh =    (cd ../tbls/ && ls *tbl |sed -e s:_:%:g -e 's:\.tbl$:.so:g')
32
33LDLIBS		= -lc
34
35LINK_TARGETS =	646%8859-1.so
36
37.NO_PARALLEL:
38
39.PARALLEL: $(ALL_SOS)
40
41all: $(ALL_SOS)
42
43include $(SRC)/lib/iconv_modules/Makefile.iconv
44
45LDFLAGS = $(DYNFLAGS) $(LDLIBS)
46
47CFLAGS		+= $(XREGSFLAG) -D_REENTRANT
48
49CLEANFILES +=	tbl.h
50
51$(ALL_SOS): ../common/euro.h ../common/euro.c tbl.h
52	TABLE=`echo $@ | $(TR) -d "-" | sed -e s:%:_:g | /usr/bin/cut -d. -f1` ; \
53	$(CC) $(CFLAGS) $(CPPFLAGS) -DT_$$TABLE ../common/euro.c -c -o $@.o ; \
54	$(LD) $(LDFLAGS) -o $@ $@.o $(LDLIBS)
55	$(POST_PROCESS_SO)
56
57tbl.h: ../genincl $(TABLES:%=../tbls/%)
58	(cd ..; ./genincl) > $@
59
60$(CREATE_LINKS):  $(ICONV_LINK_TARGETS)
61	$(SYMLINK) -f 646%8859-1.so $(ICONV_DIR)/646%8859-15.so
62	$(SYMLINK) -f 646%8859-1.so $(ICONV_DIR)/646%8859-2.so
63	$(SYMLINK) -f 646%8859-1.so $(ICONV_DIR)/646%8859-4.so
64	$(SYMLINK) -f 646%8859-1.so $(ICONV_DIR)/646%8859-5.so
65	$(SYMLINK) -f 646%8859-1.so $(ICONV_DIR)/646%8859-6.so
66	$(SYMLINK) -f 646%8859-1.so $(ICONV_DIR)/646%8859-7.so
67	$(SYMLINK) -f 646%8859-1.so $(ICONV_DIR)/646%8859-8.so
68	$(SYMLINK) -f 646%8859-1.so $(ICONV_DIR)/646%8859-9.so
69	$(SYMLINK) -f 646%8859-1.so $(ICONV_DIR)/646%CP1251.so
70	$(SYMLINK) -f 646%8859-1.so $(ICONV_DIR)/646%KOI8-R.so
71	$(TOUCH) $@
72
73FRC:
74