xref: /illumos-gate/usr/src/lib/iconv_modules/vi/Makefile.com (revision 5328fc53d11d7151861fa272e4fb0248b8f0e145)
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# Copyright (c) 2018, Joyent, Inc.
26
27SRCS		=	tcvn%UCS-2.c \
28            tcvn%UTF-8.c \
29            tcvn%viscii.c \
30            UCS-2%tcvn.c  \
31            UCS-2%viscii.c  \
32            UTF-8%tcvn.c  \
33            UTF-8%viscii.c  \
34            viscii%tcvn.c  \
35            viscii%UCS-2.c  \
36            viscii%UTF-8.c
37COMMON = ../common/
38
39LINK_TARGETS  = UCS-2BE%tcvn.so tcvn%UCS-2BE.so
40LINK_TARGETS += UCS-2BE%viscii.so viscii%UCS-2BE.so
41
42# needs work
43SMOFF += all_func_returns,deref_check
44
45dummy: all
46
47tcvn%UCS-2LE.o: $(COMMON)tcvn%UCS-2.c
48	$(CC) $(CPPFLAGS) $(CFLAGS) -DUCS_2LE -c -o $@ $^
49
50tcvn%UCS-2BE.o: $(COMMON)tcvn%UCS-2.c
51	$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $^
52
53viscii%UCS-2LE.o: $(COMMON)viscii%UCS-2.c
54	$(CC) $(CPPFLAGS) $(CFLAGS) -DUCS_2LE -c -o $@ $^
55
56viscii%UCS-2BE.o: $(COMMON)viscii%UCS-2.c
57	$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $^
58
59UCS-2LE%tcvn.o: $(COMMON)UCS-2%tcvn.c
60	$(CC) $(CPPFLAGS) $(CFLAGS) -DUCS_2LE -c -o $@ $^
61
62UCS-2BE%tcvn.o: $(COMMON)UCS-2%tcvn.c
63	$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $^
64
65UCS-2LE%viscii.o: $(COMMON)UCS-2%viscii.c
66	$(CC) $(CPPFLAGS) $(CFLAGS) -DUCS_2LE -c -o $@ $^
67
68UCS-2BE%viscii.o: $(COMMON)UCS-2%viscii.c
69	$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $^
70
71include $(SRC)/lib/iconv_modules/Makefile.iconv
72
73$(CREATE_LINKS):  $(ICONV_LINK_TARGETS)
74	$(SYMLINK) -f tcvn%UCS-2BE.so $(ICONV_DIR)/tcvn%UCS-2.so
75	$(SYMLINK) -f UCS-2BE%tcvn.so $(ICONV_DIR)/UCS-2%tcvn.so
76	$(SYMLINK) -f UCS-2BE%viscii.so $(ICONV_DIR)/UCS-2%viscii.so
77	$(SYMLINK) -f viscii%UCS-2BE.so $(ICONV_DIR)/viscii%UCS-2.so
78	$(TOUCH) $@
79
80ALL_SOS  = tcvn%UCS-2LE.so		tcvn%UCS-2BE.so
81ALL_SOS += viscii%UCS-2LE.so		viscii%UCS-2BE.so
82ALL_SOS += UCS-2LE%tcvn.so		UCS-2BE%tcvn.so
83ALL_SOS += UCS-2LE%viscii.so		UCS-2BE%viscii.so
84ALL_SOS += UTF-8%tcvn.so			tcvn%UTF-8.so
85ALL_SOS += UTF-8%viscii.so		viscii%UTF-8.so
86ALL_SOS += tcvn%viscii.so			viscii%tcvn.so
87
88all: $(ALL_SOS)
89