Print this page
10079 smatch Makefile changes for usr/src/lib
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/lib/libtnfctl/Makefile.com
+++ new/usr/src/lib/libtnfctl/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 (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.
↓ open down ↓ |
14 lines elided |
↑ open up ↑ |
15 15 # If applicable, add the following below this CDDL HEADER, with the
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 2006 Sun Microsystems, Inc. All rights reserved.
23 23 # Use is subject to license terms.
24 24 #
25 +# Copyright (c) 2018, Joyent, Inc.
25 26
26 27 LIBRARY= libtnfctl.a
27 28 VERS= .1
28 29 OBJECTS.c= open.o \
29 30 prb_child.o \
30 31 prb_shmem.o \
31 32 prb_proc.o \
32 33 prb_lmap.o \
33 34 prb_rtld.o \
34 35 prb_findexec.o \
35 36 prb_status.o \
36 37 util.o \
37 38 traverse.o \
38 39 sym.o \
39 40 elf.o \
40 41 continue.o \
41 42 checklib.o \
42 43 probes.o \
43 44 probes_ext.o \
44 45 close.o \
45 46 targmem.o \
46 47 comb.o \
47 48 kernel_int.o \
48 49 kernel.o \
49 50 internal.o \
50 51 status.o
51 52
52 53
53 54 OBJECTS.s= $(MACH)_assm.o
54 55
55 56 OBJECTS= $(OBJECTS.c) $(OBJECTS.s)
56 57
57 58 include ../../Makefile.lib
58 59
59 60 # We omit $(OBJECTS.s:%.o=%.s) in the next line, because lint no like
60 61 SRCS= $(OBJECTS.c:%.o=../%.c)
61 62
62 63 LIBS= $(DYNLIB)
63 64
64 65 HDRS= tnfctl.h
65 66 ROOTHDRDIR= $(ROOT)/usr/include/tnf
66 67 ROOTHDRS= $(HDRS:%=$(ROOTHDRDIR)/%)
67 68 CHECKHDRS= $(HDRS:%.h=%.check)
68 69 $(ROOTHDRS) := FILEMODE = 0644
69 70 CHECKHDRS = $(HDRS:%.h=%.check)
70 71
71 72 LDLIBS += -lc -lelf
72 73
↓ open down ↓ |
38 lines elided |
↑ open up ↑ |
73 74 # Uncomment the following line for a debug build
74 75 # COPTFLAG = -g -DDEBUG $(CCVERBOSE)
75 76 CPPFLAGS += -I$(SRC)/lib/libtnfprobe -D_REENTRANT -I$(SRC)/cmd/sgs/include
76 77
77 78 LINTFLAGS += -y
78 79
79 80 CERRWARN += -_gcc=-Wno-uninitialized
80 81 CERRWARN += -_gcc=-Wno-empty-body
81 82 CERRWARN += -_gcc=-Wno-parentheses
82 83
84 +# not linted
85 +SMATCH=off
86 +
83 87 ASFLAGS += -P
84 88
85 89 $(ROOTHDRS) := FILEMODE = 644
86 90
87 91 .KEEP_STATE:
88 92
89 93 all: $(LIBS)
90 94
91 95 install_h: $(ROOTHDRDIR) $(ROOTHDRS)
92 96
93 97 lint:
94 98 $(LINT.c) $(SRCS)
95 99
96 100 check: $(CHECKHDRS)
97 101
98 102 $(ROOTLIBDIR) $(ROOTHDRDIR):
99 103 $(INS.dir)
100 104
101 105 $(ROOTHDRDIR)/% : %
102 106 $(INS.file)
103 107
104 108 BUILD.s= $(AS) $< -o $@
105 109
106 110 objs/%.o pics/%.o: ../%.s
107 111 $(COMPILE.s) -o $@ $<
108 112 $(POST_PROCESS_O)
109 113
110 114 objs/%.o pics/%.o: ../%.c
111 115 $(COMPILE.c) -o $@ $<
112 116 $(POST_PROCESS_O)
113 117
114 118
115 119 %.o: ../%.c
116 120 $(COMPILE.c) -o $@ $<
117 121 $(POST_PROCESS_O)
118 122
119 123 include ../../Makefile.targ
↓ open down ↓ |
27 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX