Print this page
10080 smatch Makefile changes for usr/src/cmd
   1 #
   2 # This file and its contents are supplied under the terms of the
   3 # Common Development and Distribution License ("CDDL"), version 1.0.
   4 # You may only use this file in accordance with the terms of version
   5 # 1.0 of the CDDL.
   6 #
   7 # A full copy of the text of the CDDL should have accompanied this
   8 # source.  A copy of the CDDL is also available via the Internet at
   9 # http://www.illumos.org/license/CDDL.
  10 #
  11 
  12 #
  13 # Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  14 # Copyright 2017 Joyent Inc.
  15 #
  16 
  17 PROG=iconv
  18 
  19 include ../Makefile.cmd
  20 include ../Makefile.ctf
  21 
  22 OBJS = iconv_main.o iconv_list.o charmap.o parser.tab.o scanner.o
  23 
  24 SRCS    = $(OBJS:%.o=%.c)
  25 
  26 CSTD=   $(CSTD_GNU99)
  27 LDLIBS          += -lcmdutils -lavl
  28 YFLAGS          = -d -b parser
  29 CPPFLAGS        += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
  30 $(RELEASE_BUILD) CPPFLAGS += -DNDEBUG
  31 
  32 CERRWARN +=     -_gcc=-Wno-unused-label
  33 



  34 CLEANFILES      = $(OBJS) parser.tab.c parser.tab.h
  35 CLOBBERFILES    = $(PROG) $(POFILE)
  36 PIFILES         = $(OBJS:%.o=%.i)
  37 POFILE          = iconv_cmd.po
  38 
  39 all: $(PROG)
  40 
  41 install: all $(ROOTPROG)
  42 
  43 $(PROG): $(OBJS)
  44         $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
  45         $(POST_PROCESS)
  46 
  47 $(OBJS):        parser.tab.h
  48 $(PIFILES):     parser.tab.h
  49 
  50 parser.tab.c parser.tab.h: parser.y
  51         $(YACC) $(YFLAGS) parser.y
  52 
  53 lint:   $(SRCS)
   1 #
   2 # This file and its contents are supplied under the terms of the
   3 # Common Development and Distribution License ("CDDL"), version 1.0.
   4 # You may only use this file in accordance with the terms of version
   5 # 1.0 of the CDDL.
   6 #
   7 # A full copy of the text of the CDDL should have accompanied this
   8 # source.  A copy of the CDDL is also available via the Internet at
   9 # http://www.illumos.org/license/CDDL.
  10 #
  11 
  12 #
  13 # Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  14 # Copyright (c) 2018, Joyent, Inc.
  15 #
  16 
  17 PROG=iconv
  18 
  19 include ../Makefile.cmd
  20 include ../Makefile.ctf
  21 
  22 OBJS = iconv_main.o iconv_list.o charmap.o parser.tab.o scanner.o
  23 
  24 SRCS    = $(OBJS:%.o=%.c)
  25 
  26 CSTD=   $(CSTD_GNU99)
  27 LDLIBS          += -lcmdutils -lavl
  28 YFLAGS          = -d -b parser
  29 CPPFLAGS        += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
  30 $(RELEASE_BUILD) CPPFLAGS += -DNDEBUG
  31 
  32 CERRWARN +=     -_gcc=-Wno-unused-label
  33 
  34 # not linted
  35 SMATCH=off
  36 
  37 CLEANFILES      = $(OBJS) parser.tab.c parser.tab.h
  38 CLOBBERFILES    = $(PROG) $(POFILE)
  39 PIFILES         = $(OBJS:%.o=%.i)
  40 POFILE          = iconv_cmd.po
  41 
  42 all: $(PROG)
  43 
  44 install: all $(ROOTPROG)
  45 
  46 $(PROG): $(OBJS)
  47         $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
  48         $(POST_PROCESS)
  49 
  50 $(OBJS):        parser.tab.h
  51 $(PIFILES):     parser.tab.h
  52 
  53 parser.tab.c parser.tab.h: parser.y
  54         $(YACC) $(YFLAGS) parser.y
  55 
  56 lint:   $(SRCS)