Print this page
10080 smatch Makefile changes for usr/src/cmd


   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 usr/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 usr/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 2007 Sun Microsystems, Inc.  All rights reserved.
  23 # Use is subject to license terms.
  24 #
  25 # Copyright 2017, Joyent Inc.
  26 #
  27 
  28 FSTYPE=         udfs
  29 LIBPROG=        fsdb
  30 
  31 include         ../../Makefile.fstype
  32 
  33 # fsdb has a name clash with main() and libl.so.1.  However, fsdb must
  34 # still export a number of "yy*" (libl) interfaces.  Reduce all other symbols
  35 # to local scope.
  36 MAPFILES +=     $(MAPFILE.INT) $(MAPFILE.LEX) $(MAPFILE.NGB)
  37 MAPOPTS =       $(MAPFILES:%=-M%)
  38 
  39 CPPFLAGS +=     -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
  40 LDLIBS +=       -lmalloc -ll -ladm
  41 LDFLAGS +=      $(MAPOPTS)
  42 YFLAGS =        "-d"
  43 
  44 LINTFLAGS +=    -erroff=E_STATIC_UNUSED
  45 LINTFLAGS64 +=  -erroff=E_STATIC_UNUSED
  46 
  47 CERRWARN +=     -_gcc=-Wno-implicit-function-declaration
  48 CERRWARN +=     -_gcc=-Wno-unused-label
  49 CERRWARN +=     -_gcc=-Wno-unused-variable
  50 CERRWARN +=     -_gcc=-Wno-uninitialized
  51 CERRWARN +=     -_gcc=-Wno-unused-value
  52 CERRWARN +=     -_gcc=-Wno-unused-function
  53 



  54 SRCS=   fsdb.c ud_lib.c
  55 
  56 fsdb : fsdb_yacc.o fsdb_lex.o ud_lib.o fsdb.o $(MAPFILES)
  57         $(LINK.c) -o $@ fsdb.o fsdb_yacc.o fsdb_lex.o \
  58                         ud_lib.o $(LDLIBS)
  59         $(POST_PROCESS)
  60 
  61 fsdb.o : fsdb.c
  62         $(COMPILE.c) -o $@ fsdb.c
  63         $(POST_PROCESS_O)
  64 
  65 ud_lib.o : ud_lib.c ud_lib.h
  66         $(COMPILE.c) -o $@ ud_lib.c
  67         $(POST_PROCESS_O)
  68 
  69 ud_lib.c : ../fstyp/ud_lib.c
  70         $(RM) $@
  71         $(CP) ../fstyp/ud_lib.c $@
  72 
  73 ud_lib.h : ../fstyp/ud_lib.h




   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 usr/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 usr/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 2007 Sun Microsystems, Inc.  All rights reserved.
  23 # Use is subject to license terms.
  24 #
  25 # Copyright (c) 2018, Joyent, Inc.
  26 #
  27 
  28 FSTYPE=         udfs
  29 LIBPROG=        fsdb
  30 
  31 include         ../../Makefile.fstype
  32 
  33 # fsdb has a name clash with main() and libl.so.1.  However, fsdb must
  34 # still export a number of "yy*" (libl) interfaces.  Reduce all other symbols
  35 # to local scope.
  36 MAPFILES +=     $(MAPFILE.INT) $(MAPFILE.LEX) $(MAPFILE.NGB)
  37 MAPOPTS =       $(MAPFILES:%=-M%)
  38 
  39 CPPFLAGS +=     -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
  40 LDLIBS +=       -lmalloc -ll -ladm
  41 LDFLAGS +=      $(MAPOPTS)
  42 YFLAGS =        "-d"
  43 
  44 LINTFLAGS +=    -erroff=E_STATIC_UNUSED
  45 LINTFLAGS64 +=  -erroff=E_STATIC_UNUSED
  46 
  47 CERRWARN +=     -_gcc=-Wno-implicit-function-declaration
  48 CERRWARN +=     -_gcc=-Wno-unused-label
  49 CERRWARN +=     -_gcc=-Wno-unused-variable
  50 CERRWARN +=     -_gcc=-Wno-uninitialized
  51 CERRWARN +=     -_gcc=-Wno-unused-value
  52 CERRWARN +=     -_gcc=-Wno-unused-function
  53 
  54 # not linted
  55 SMATCH=off
  56 
  57 SRCS=   fsdb.c ud_lib.c
  58 
  59 fsdb : fsdb_yacc.o fsdb_lex.o ud_lib.o fsdb.o $(MAPFILES)
  60         $(LINK.c) -o $@ fsdb.o fsdb_yacc.o fsdb_lex.o \
  61                         ud_lib.o $(LDLIBS)
  62         $(POST_PROCESS)
  63 
  64 fsdb.o : fsdb.c
  65         $(COMPILE.c) -o $@ fsdb.c
  66         $(POST_PROCESS_O)
  67 
  68 ud_lib.o : ud_lib.c ud_lib.h
  69         $(COMPILE.c) -o $@ ud_lib.c
  70         $(POST_PROCESS_O)
  71 
  72 ud_lib.c : ../fstyp/ud_lib.c
  73         $(RM) $@
  74         $(CP) ../fstyp/ud_lib.c $@
  75 
  76 ud_lib.h : ../fstyp/ud_lib.h