Print this page
11528 Makefile.noget can get gone
11529 Use -Wno-maybe-initialized
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/tnf/prex/Makefile.com
+++ new/usr/src/cmd/tnf/prex/Makefile.com
1 1 #
2 2 # CDDL HEADER START
3 3 #
4 4 # The contents of this file are subject to the terms of the
5 5 # Common Development and Distribution License, Version 1.0 only
6 6 # (the "License"). You may not use this file except in compliance
7 7 # with the License.
8 8 #
9 9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 10 # or http://www.opensolaris.org/os/licensing.
11 11 # See the License for the specific language governing permissions
12 12 # and limitations under the License.
13 13 #
14 14 # When distributing Covered Code, include this CDDL HEADER in each
15 15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 16 # If applicable, add the following below this CDDL HEADER, with the
17 17 # fields enclosed by brackets "[]" replaced with your own identifying
18 18 # information: Portions Copyright [yyyy] [name of copyright owner]
19 19 #
20 20 # CDDL HEADER END
21 21 #
22 22
23 23 #
24 24 # Copyright 1989,2003 Sun Microsystems, Inc. All rights reserved.
25 25 # Use is subject to license terms.
26 26 #
27 27 # Copyright (c) 2018, Joyent, Inc.
28 28
29 29 PROG= prex
30 30
31 31 OBJS.c= source.o \
32 32 main.o \
33 33 util.o \
34 34 expr.o \
35 35 spec.o \
36 36 set.o \
37 37 queue.o \
38 38 cmd.o \
39 39 new.o \
40 40 list.o \
41 41 fcn.o \
42 42 prbk.o \
43 43 help.o
44 44
45 45 OBJS.yl= prexgram.o \
46 46 prexlex.o
47 47
48 48 OBJS= $(OBJS.yl) $(OBJS.c)
49 49
50 50 SRCS= $(OBJS.c:%.o=../%.c) $(OBJS.yl:%.o=%.c)
51 51
52 52 SRCS.yl = $(OBJS.yl:%.o=%.c)
53 53 CLEANFILES = $(SRCS.yl) y.tab.h
54 54
55 55 include ../../../Makefile.cmd
56 56
57 57 POFILE= prex.po
58 58 POFILES= $(OBJS.c:%.o=%.po)
59 59
↓ open down ↓ |
59 lines elided |
↑ open up ↑ |
60 60 #YFLAGS= -d -t -v
61 61 YFLAGS= -d
62 62 LFLAGS= -v
63 63 # FOR normal makefile, uncomment the next line
64 64 LDLIBS += -lgen -ltnfctl -lelf -lc
65 65
66 66 CFLAGS += $(CCVERBOSE)
67 67 CERRWARN += -_gcc=-Wno-unused-label
68 68 CERRWARN += -_gcc=-Wno-unused-variable
69 69 CERRWARN += -_gcc=-Wno-parentheses
70 -CERRWARN += -_gcc=-Wno-uninitialized
70 +CERRWARN += $(CNOWARN_UNINIT)
71 71
72 72 # not linted
73 73 SMATCH=off
74 74
75 75 .KEEP_STATE:
76 76
77 77 .PARALLEL: $(OBJS)
78 78
79 79 all: $(PROG)
80 80
81 81 #OBJS can be built in parallel after all .c (and y.tab.h) are properly built
82 82 $(PROG): $(SRCS.yl) .WAIT $(OBJS)
83 83 $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
84 84 $(POST_PROCESS)
85 85
86 86 #This also builds y.tab.h
87 87 prexgram.c: ../prexgram.y
88 88 $(YACC.y) ../prexgram.y
89 89 mv y.tab.c $@
90 90
91 91 prexlex.c: ../prexlex.l
92 92 $(RM) $@
93 93 $(LEX.l) ../prexlex.l > $@
94 94
95 95 #Use %.c in priority to ../%.c for prexgram.c and prexlec.c
96 96 %.o: %.c
97 97 $(COMPILE.c) $<
98 98
99 99 %.o: ../%.c
100 100 $(COMPILE.c) $<
101 101
102 102
103 103 $(ROOTBIN):
104 104 $(INS.dir)
105 105
106 106 $(POFILE): $(POFILES)
107 107 $(RM) $@
108 108 cat $(POFILES) > $@
109 109
110 110 clean:
111 111 $(RM) $(OBJS) $(CLEANFILES)
112 112
113 113 lint: $(OBJS)
114 114 $(LINT.c) $(SRCS)
115 115
116 116 include ../../../Makefile.targ
↓ open down ↓ |
36 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX