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 (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
  23 # Copyright 2012 Milan Jurik. All rights reserved.
  24 # Copyright 2016 Toomas Soome <tsoome@me.com>

  25 #
  26 
  27 PROG = svc.startd
  28 OBJS = \
  29         contract.o \
  30         deathrow.o \
  31         dict.o \
  32         env.o \
  33         expand.o \
  34         file.o \
  35         fork.o \
  36         graph.o \
  37         libscf.o \
  38         log.o \
  39         method.o \
  40         misc.o \
  41         protocol.o \
  42         restarter.o \
  43         specials.o \
  44         startd.o \


  55         ../common/manifest_hash.c
  56 
  57 POFILES = $(OBJS:%.o=%.po) \
  58         proc.po \
  59         ../common/manifest_hash.po
  60 
  61 include ../../Makefile.cmd
  62 include ../../Makefile.ctf
  63 
  64 ROOTCMDDIR=     $(ROOT)/lib/svc/bin
  65 
  66 $(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
  67 CFLAGS += $(CCVERBOSE)
  68 CPPFLAGS += -I. -I../common
  69 
  70 CERRWARN += -_gcc=-Wno-parentheses
  71 CERRWARN += -_gcc=-Wno-unused-label
  72 CERRWARN += -_gcc=-Wno-switch
  73 CERRWARN += -_gcc=-Wno-uninitialized
  74 



  75 $(OBJS) := CPPFLAGS += -D_FILE_OFFSET_BITS=64 -D_REENTRANT
  76 
  77 proc.o := CPPFLAGS += -D_REENTRANT
  78 
  79 %.o:    ../common/%.c
  80         $(COMPILE.c) $(OUTPUT_OPTION) $<
  81         $(POST_PROCESS_O)
  82 
  83 %.ln:   ../common/%.c
  84         $(LINT.c) $(OUTPUT_OPTION) -c $<
  85 
  86 LDLIBS += \
  87         -lcontract \
  88         -lkstat \
  89         -lmd5 \
  90         -lnvpair \
  91         -lrestart \
  92         -lscf \
  93         -lsysevent \
  94         -lumem \




   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 (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
  23 # Copyright 2012 Milan Jurik. All rights reserved.
  24 # Copyright 2016 Toomas Soome <tsoome@me.com>
  25 # Copyright (c) 2018, Joyent, Inc.
  26 #
  27 
  28 PROG = svc.startd
  29 OBJS = \
  30         contract.o \
  31         deathrow.o \
  32         dict.o \
  33         env.o \
  34         expand.o \
  35         file.o \
  36         fork.o \
  37         graph.o \
  38         libscf.o \
  39         log.o \
  40         method.o \
  41         misc.o \
  42         protocol.o \
  43         restarter.o \
  44         specials.o \
  45         startd.o \


  56         ../common/manifest_hash.c
  57 
  58 POFILES = $(OBJS:%.o=%.po) \
  59         proc.po \
  60         ../common/manifest_hash.po
  61 
  62 include ../../Makefile.cmd
  63 include ../../Makefile.ctf
  64 
  65 ROOTCMDDIR=     $(ROOT)/lib/svc/bin
  66 
  67 $(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
  68 CFLAGS += $(CCVERBOSE)
  69 CPPFLAGS += -I. -I../common
  70 
  71 CERRWARN += -_gcc=-Wno-parentheses
  72 CERRWARN += -_gcc=-Wno-unused-label
  73 CERRWARN += -_gcc=-Wno-switch
  74 CERRWARN += -_gcc=-Wno-uninitialized
  75 
  76 # these look like real bugs here, but ...
  77 SMOFF += impossible_mask,signed_integer_overflow_check
  78 
  79 $(OBJS) := CPPFLAGS += -D_FILE_OFFSET_BITS=64 -D_REENTRANT
  80 
  81 proc.o := CPPFLAGS += -D_REENTRANT
  82 
  83 %.o:    ../common/%.c
  84         $(COMPILE.c) $(OUTPUT_OPTION) $<
  85         $(POST_PROCESS_O)
  86 
  87 %.ln:   ../common/%.c
  88         $(LINT.c) $(OUTPUT_OPTION) -c $<
  89 
  90 LDLIBS += \
  91         -lcontract \
  92         -lkstat \
  93         -lmd5 \
  94         -lnvpair \
  95         -lrestart \
  96         -lscf \
  97         -lsysevent \
  98         -lumem \