Print this page
8516 Suppress gcc errors with -Wno- in Makefile for usr/src/cmd
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/svc/configd/Makefile
+++ new/usr/src/cmd/svc/configd/Makefile
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 (the "License").
6 6 # You may not use this file except in compliance with the License.
7 7 #
8 8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 # or http://www.opensolaris.org/os/licensing.
10 10 # See the License for the specific language governing permissions
11 11 # and limitations under the License.
12 12 #
13 13 # When distributing Covered Code, include this CDDL HEADER in each
14 14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 # If applicable, add the following below this CDDL HEADER, with the
↓ open down ↓ |
15 lines elided |
↑ open up ↑ |
16 16 # fields enclosed by brackets "[]" replaced with your own identifying
17 17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 18 #
19 19 # CDDL HEADER END
20 20 #
21 21 #
22 22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 23 # Use is subject to license terms.
24 24 #
25 25 # Copyright 2015 RackTop Systems.
26 +# Copyright 2017 Gary Mills
26 27 #
27 28
28 29 MYPROG = svc.configd
29 30 MYOBJS = \
30 31 backend.o \
31 32 configd.o \
32 33 client.o \
33 34 file_object.o \
34 35 maindoor.o \
35 36 object.o \
36 37 rc_node.o \
37 38 snapshot.o
38 39
39 40 PROG = $(MYPROG)
40 41 OBJS = $(MYOBJS)
41 42
42 43 SRCS = $(MYOBJS:%.o=%.c)
43 44
44 45 include ../../Makefile.cmd
45 46 include ../../Makefile.ctf
46 47
47 48 NATIVE_BUILD=$(POUND_SIGN)
48 49 $(NATIVE_BUILD)PROG = $(MYPROG:%=%-native)
49 50 $(NATIVE_BUILD)OBJS = $(MYOBJS:%.o=%-native.o)
50 51
51 52 ROOTCMDDIR= $(ROOT)/lib/svc/bin
52 53
53 54 MYCPPFLAGS = -I. -I../common -I../../../common/svc \
54 55 -I$(ROOT)/usr/include/sqlite-sys -D_REENTRANT
55 56 CPPFLAGS += $(MYCPPFLAGS)
56 57 CFLAGS += $(CCVERBOSE)
57 58 CERRWARN += -_gcc=-Wno-parentheses
58 59 CERRWARN += -_gcc=-Wno-type-limits
59 60 CERRWARN += -_gcc=-Wno-unused-label
60 61 CERRWARN += -_gcc=-Wno-unused-variable
61 62 CERRWARN += -_gcc=-Wno-unused-function
62 63 CERRWARN += -_gcc=-Wno-uninitialized
63 64 MYLDLIBS = -lumem -luutil
64 65 LDLIBS += -lsecdb -lbsm $(MYLDLIBS)
65 66 LINTFLAGS += -errtags -erroff=E_BAD_FORMAT_ARG_TYPE2 -erroff=E_NAME_DEF_NOT_USED2
66 67
67 68 CLOBBERFILES += $(MYPROG:%=%-native)
68 69
69 70 LIBUUTIL = $(SRC)/lib/libuutil
70 71 LIBSCF = $(SRC)/lib/libscf
71 72
72 73 SCRIPTFILE = restore_repository
73 74 ROOTSCRIPTFILE = $(ROOTCMDDIR)/$(SCRIPTFILE)
74 75
75 76 #
76 77 # Native variant (used in ../seed)
77 78 #
78 79 $(NATIVE_BUILD)CC = $(NATIVECC)
79 80 $(NATIVE_BUILD)LD = $(NATIVELD)
80 81 $(NATIVE_BUILD)CFLAGS = $(NATIVE_CFLAGS)
81 82 $(NATIVE_BUILD)CPPFLAGS = $(MYCPPFLAGS) -I$(LIBUUTIL)/common -I$(LIBSCF)/inc
82 83 $(NATIVE_BUILD)CPPFLAGS += -DNATIVE_BUILD
83 84 $(NATIVE_BUILD)LDFLAGS =
84 85 $(NATIVE_BUILD)LDLIBS = -L$(ADJUNCT_PROTO)/usr/lib -R$(ADJUNCT_PROTO)/usr/lib \
85 86 -L$(LIBUUTIL)/native -R $(LIBUUTIL)/native $(MYLDLIBS)
86 87
87 88 DIRMODE = 0755
↓ open down ↓ |
52 lines elided |
↑ open up ↑ |
88 89 FILEMODE = 0555
89 90
90 91 OBJSQLITE =
91 92 LIBSQLITE = -lsqlite-sys
92 93 $(NATIVE_BUILD)OBJSQLITE = $(ROOT)/lib/libsqlite-native.o
93 94 $(NATIVE_BUILD)LIBSQLITE =
94 95
95 96 OBJS += $(OBJSQLITE)
96 97 LDLIBS += $(LIBSQLITE)
97 98
99 +# Suppress error for: event_id
100 +rc_node-native.o := CERRWARN += -_gcc=-Wno-unused-but-set-variable
101 +
98 102 install := TARGET = install
99 103 clobber := TARGET = clobber
100 104
101 105 .KEEP_STATE:
102 106 .PARALLEL: $(MYOBJS) $(MYOBJS:%.o=%-native.o)
103 107
104 108 all: $(PROG)
105 109
106 110 native: FRC
107 111 @cd $(LIBUUTIL)/native; pwd; $(MAKE) $(MFLAGS) install
108 112 @NATIVE_BUILD= $(MAKE) $(MFLAGS) all
109 113
110 114 $(PROG): $(OBJS)
111 115 $(LINK.c) -o $@ $(OBJS) $(LDLIBS)
112 116 $(POST_PROCESS)
113 117
114 118 %-native.o: %.c
115 119 $(COMPILE.c) -o $@ $<
116 120 $(POST_PROCESS_O)
117 121
118 122 $(ROOTCMDDIR)/%: %.sh
119 123 $(INS.rename)
120 124
121 125 install: all $(ROOTCMD) $(ROOTVARSADMFILE) $(ROOTSCRIPTFILE)
122 126
123 127 clean: FRC
124 128 $(RM) $(MYOBJS) $(MYOBJS:%.o=%-native.o)
125 129
126 130 clobber:
127 131
128 132 lint: lint_SRCS
129 133
130 134 lint_SRCS:
131 135
132 136 include ../../Makefile.targ
133 137
134 138 FRC:
↓ open down ↓ |
27 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX