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 2008 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25
26SRCS		=	tcvn%UCS-2.c \
27            tcvn%UTF-8.c \
28            tcvn%viscii.c \
29            UCS-2%tcvn.c  \
30            UCS-2%viscii.c  \
31            UTF-8%tcvn.c  \
32            UTF-8%viscii.c  \
33            viscii%tcvn.c  \
34            viscii%UCS-2.c  \
35            viscii%UTF-8.c
36COMMON = ../common/
37
38LINK_TARGETS  = UCS-2BE%tcvn.so tcvn%UCS-2BE.so
39LINK_TARGETS += UCS-2BE%viscii.so viscii%UCS-2BE.so
40
41dummy: all
42
43tcvn%UCS-2LE.o: $(COMMON)tcvn%UCS-2.c
44	$(CC) $(CFLAGS) -DUCS_2LE -c -o $@ $^
45
46tcvn%UCS-2BE.o: $(COMMON)tcvn%UCS-2.c
47	$(CC) $(CFLAGS) -c -o $@ $^
48
49viscii%UCS-2LE.o: $(COMMON)viscii%UCS-2.c
50	$(CC) $(CFLAGS) -DUCS_2LE -c -o $@ $^
51
52viscii%UCS-2BE.o: $(COMMON)viscii%UCS-2.c
53	$(CC) $(CFLAGS) -c -o $@ $^
54
55UCS-2LE%tcvn.o: $(COMMON)UCS-2%tcvn.c
56	$(CC) $(CFLAGS) -DUCS_2LE -c -o $@ $^
57
58UCS-2BE%tcvn.o: $(COMMON)UCS-2%tcvn.c
59	$(CC) $(CFLAGS) -c -o $@ $^
60
61UCS-2LE%viscii.o: $(COMMON)UCS-2%viscii.c
62	$(CC) $(CFLAGS) -DUCS_2LE -c -o $@ $^
63
64UCS-2BE%viscii.o: $(COMMON)UCS-2%viscii.c
65	$(CC) $(CFLAGS) -c -o $@ $^
66
67include $(SRC)/lib/iconv_modules/Makefile.iconv
68
69$(CREATE_LINKS):  $(ICONV_LINK_TARGETS)
70	$(SYMLINK) -f tcvn%UCS-2BE.so $(ICONV_DIR)/tcvn%UCS-2.so
71	$(SYMLINK) -f UCS-2BE%tcvn.so $(ICONV_DIR)/UCS-2%tcvn.so
72	$(SYMLINK) -f UCS-2BE%viscii.so $(ICONV_DIR)/UCS-2%viscii.so
73	$(SYMLINK) -f viscii%UCS-2BE.so $(ICONV_DIR)/viscii%UCS-2.so
74	$(TOUCH) $@
75
76ALL_SOS  = tcvn%UCS-2LE.so		tcvn%UCS-2BE.so
77ALL_SOS += viscii%UCS-2LE.so		viscii%UCS-2BE.so
78ALL_SOS += UCS-2LE%tcvn.so		UCS-2BE%tcvn.so
79ALL_SOS += UCS-2LE%viscii.so		UCS-2BE%viscii.so
80ALL_SOS += UTF-8%tcvn.so			tcvn%UTF-8.so
81ALL_SOS += UTF-8%viscii.so		viscii%UTF-8.so
82ALL_SOS += tcvn%viscii.so			viscii%tcvn.so
83
84all: $(ALL_SOS)
85