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 
  27 SRCS            =       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
  37 COMMON = ../common/
  38 
  39 LINK_TARGETS  = UCS-2BE%tcvn.so tcvn%UCS-2BE.so
  40 LINK_TARGETS += UCS-2BE%viscii.so viscii%UCS-2BE.so
  41 
  42 # needs work
  43 SMOFF += all_func_returns,deref_check
  44 
  45 dummy: all
  46 
  47 tcvn%UCS-2LE.o: $(COMMON)tcvn%UCS-2.c
  48         $(CC) $(CFLAGS) -DUCS_2LE -c -o $@ $^
  49 
  50 tcvn%UCS-2BE.o: $(COMMON)tcvn%UCS-2.c
  51         $(CC) $(CFLAGS) -c -o $@ $^
  52 
  53 viscii%UCS-2LE.o: $(COMMON)viscii%UCS-2.c
  54         $(CC) $(CFLAGS) -DUCS_2LE -c -o $@ $^
  55 
  56 viscii%UCS-2BE.o: $(COMMON)viscii%UCS-2.c
  57         $(CC) $(CFLAGS) -c -o $@ $^
  58 
  59 UCS-2LE%tcvn.o: $(COMMON)UCS-2%tcvn.c
  60         $(CC) $(CFLAGS) -DUCS_2LE -c -o $@ $^
  61 
  62 UCS-2BE%tcvn.o: $(COMMON)UCS-2%tcvn.c
  63         $(CC) $(CFLAGS) -c -o $@ $^
  64 
  65 UCS-2LE%viscii.o: $(COMMON)UCS-2%viscii.c
  66         $(CC) $(CFLAGS) -DUCS_2LE -c -o $@ $^
  67 
  68 UCS-2BE%viscii.o: $(COMMON)UCS-2%viscii.c
  69         $(CC) $(CFLAGS) -c -o $@ $^
  70 
  71 include $(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 
  80 ALL_SOS  = tcvn%UCS-2LE.so              tcvn%UCS-2BE.so
  81 ALL_SOS += viscii%UCS-2LE.so            viscii%UCS-2BE.so
  82 ALL_SOS += UCS-2LE%tcvn.so              UCS-2BE%tcvn.so
  83 ALL_SOS += UCS-2LE%viscii.so            UCS-2BE%viscii.so
  84 ALL_SOS += UTF-8%tcvn.so                        tcvn%UTF-8.so
  85 ALL_SOS += UTF-8%viscii.so              viscii%UTF-8.so
  86 ALL_SOS += tcvn%viscii.so                       viscii%tcvn.so
  87 
  88 all: $(ALL_SOS)