Print this page
10079 smatch Makefile changes for usr/src/lib


   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 
  26 SRCS            =       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
  36 COMMON = ../common/
  37 
  38 LINK_TARGETS  = UCS-2BE%tcvn.so tcvn%UCS-2BE.so
  39 LINK_TARGETS += UCS-2BE%viscii.so viscii%UCS-2BE.so
  40 



  41 dummy: all
  42 
  43 tcvn%UCS-2LE.o: $(COMMON)tcvn%UCS-2.c
  44         $(CC) $(CFLAGS) -DUCS_2LE -c -o $@ $^
  45 
  46 tcvn%UCS-2BE.o: $(COMMON)tcvn%UCS-2.c
  47         $(CC) $(CFLAGS) -c -o $@ $^
  48 
  49 viscii%UCS-2LE.o: $(COMMON)viscii%UCS-2.c
  50         $(CC) $(CFLAGS) -DUCS_2LE -c -o $@ $^
  51 
  52 viscii%UCS-2BE.o: $(COMMON)viscii%UCS-2.c
  53         $(CC) $(CFLAGS) -c -o $@ $^
  54 
  55 UCS-2LE%tcvn.o: $(COMMON)UCS-2%tcvn.c
  56         $(CC) $(CFLAGS) -DUCS_2LE -c -o $@ $^
  57 
  58 UCS-2BE%tcvn.o: $(COMMON)UCS-2%tcvn.c
  59         $(CC) $(CFLAGS) -c -o $@ $^
  60 




   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