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 2008 Sun Microsystems, Inc.  All rights reserved.
  23 # Use is subject to license terms.
  24 #

  25 
  26 PROG= ed
  27 XPG4PROG= ed
  28 XPG6PROG= ed
  29 
  30 EDOBJ= ed.o compile.o
  31 XPG4EDOBJ= edobjs.xpg4/ed.o edobjs.xpg4/compile.o  values-xpg4.o
  32 XPG6EDOBJ= edobjs.xpg6/ed.o edobjs.xpg6/compile.o  values-xpg6.o
  33 OBJS= $(EDOBJ) $(XPG4EDOBJ) $(XPG6EDOBJ)
  34 SRCS= ./ed.c ../expr/compile.c 
  35 
  36 POFILES= $(EDOBJ:%.o=%.po)
  37 
  38 include ../Makefile.cmd
  39 
  40 CFLAGS += $(CCVERBOSE)
  41 CERRWARN += -_gcc=-Wno-parentheses
  42 CERRWARN += -_gcc=-Wno-unused-variable
  43 CERRWARN += -_gcc=-Wno-unused-function
  44 CERRWARN += -_gcc=-Wno-uninitialized




  45 $(XPG4) := CFLAGS += -DXPG4  
  46 $(XPG6) := CFLAGS += -DXPG6 -I$(SRC)/lib/libc/inc 
  47 lint := LDLIBS += -lgen -lcrypt
  48 LDLIBS += -lmapmalloc -lgen -lcrypt_i
  49 XGETFLAGS += -a -x ed.xcl
  50 
  51 MAPFILE.INT =   ../expr/mapfile-intf
  52 LDFLAGS +=      $(MAPFILE.INT:%=-M%)
  53 
  54 POFILE= ed_cmd.po
  55 
  56 %.po: ../expr/%.c
  57         $(COMPILE.cpp) $< > $*.c.i
  58         $(XGETTEXT) $(XGETFLAGS) $*.c.i
  59         $(MV) messages.po $@
  60 
  61 .KEEP_STATE:
  62 
  63 all:    $(PROG) $(XPG4) $(XPG6)
  64 




   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 2008 Sun Microsystems, Inc.  All rights reserved.
  23 # Use is subject to license terms.
  24 #
  25 # Copyright (c) 2018, Joyent, Inc.
  26 
  27 PROG= ed
  28 XPG4PROG= ed
  29 XPG6PROG= ed
  30 
  31 EDOBJ= ed.o compile.o
  32 XPG4EDOBJ= edobjs.xpg4/ed.o edobjs.xpg4/compile.o  values-xpg4.o
  33 XPG6EDOBJ= edobjs.xpg6/ed.o edobjs.xpg6/compile.o  values-xpg6.o
  34 OBJS= $(EDOBJ) $(XPG4EDOBJ) $(XPG6EDOBJ)
  35 SRCS= ./ed.c ../expr/compile.c 
  36 
  37 POFILES= $(EDOBJ:%.o=%.po)
  38 
  39 include ../Makefile.cmd
  40 
  41 CFLAGS += $(CCVERBOSE)
  42 CERRWARN += -_gcc=-Wno-parentheses
  43 CERRWARN += -_gcc=-Wno-unused-variable
  44 CERRWARN += -_gcc=-Wno-unused-function
  45 CERRWARN += -_gcc=-Wno-uninitialized
  46 
  47 # not linted
  48 SMATCH=off
  49 
  50 $(XPG4) := CFLAGS += -DXPG4  
  51 $(XPG6) := CFLAGS += -DXPG6 -I$(SRC)/lib/libc/inc 
  52 lint := LDLIBS += -lgen -lcrypt
  53 LDLIBS += -lmapmalloc -lgen -lcrypt_i
  54 XGETFLAGS += -a -x ed.xcl
  55 
  56 MAPFILE.INT =   ../expr/mapfile-intf
  57 LDFLAGS +=      $(MAPFILE.INT:%=-M%)
  58 
  59 POFILE= ed_cmd.po
  60 
  61 %.po: ../expr/%.c
  62         $(COMPILE.cpp) $< > $*.c.i
  63         $(XGETTEXT) $(XGETFLAGS) $*.c.i
  64         $(MV) messages.po $@
  65 
  66 .KEEP_STATE:
  67 
  68 all:    $(PROG) $(XPG4) $(XPG6)
  69