Print this page
12312 fix unused lib dependencies
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/oawk/Makefile
+++ new/usr/src/cmd/oawk/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, 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.
↓ open down ↓ |
15 lines elided |
↑ open up ↑ |
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 # Copyright 2005 Sun Microsystems, Inc. All rights reserved.
24 24 # Use is subject to license terms.
25 25 #
26 -# Copyright (c) 2018, Joyent, Inc.
26 +# Copyright 2020 Joyent, Inc.
27 27
28 28 include ../Makefile.cmd
29 29
30 30 PROG = oawk
31 31 LINKPROG = awk
32 32
33 33 SRCS = b.c lib.c main.c parse.c run.c tran.c
34 34
35 35 #TXTS = README EXPLAIN
36 36
37 37 OBJS = awk.g.o awk.lx.o proctab.o tmptoken.o \
38 38 $(SRCS:%.c=%.o)
39 39
40 40 #
41 41 # for message catalogue
42 42 #
43 43 POFILES= $(OBJS:%.o=%.po)
44 44 POFILE= oawk.po
45 45 XGETFLAGS += -a -x oawk.xcl
46 46
47 47 NATIVEDIR = native
48 48 MAKEPRCTAB = $(NATIVEDIR)/makeprctab
49 49
50 50 NATIVEOBJS = $(NATIVEDIR)/makeprctab.o $(NATIVEDIR)/tmptoken.o
↓ open down ↓ |
14 lines elided |
↑ open up ↑ |
51 51 $(MAKEPRCTAB) := CC = $(NATIVECC)
52 52 $(MAKEPRCTAB) := POST_PROCESS=
53 53 $(MAKEPRCTAB) := POST_PROCESS_O=
54 54 $(MAKEPRCTAB) := NATIVE_LIBS += libm.so libc.so
55 55
56 56 CLEANFILES = proctab.c y.tab.h y.tab.c awk.h awk.g.c \
57 57 tmptoken.c awk.lx.c $(NATIVEOBJS) $(MAKEPRCTAB) \
58 58 temp
59 59
60 60 YFLAGS = -d
61 -XLDLIBS5CC += -lm
62 -LDLIBS += -lm
61 +LDLIBS += -lm
63 62 CPPFLAGS = -I. $(CPPFLAGS.master)
64 63 CPPFLAGS += -D_FILE_OFFSET_BITS=64
65 64
66 65 ROOTLINK = $(LINKPROG:%=$(ROOTBIN)/%)
67 66
68 67 CERRWARN += -_gcc=-Wno-implicit-function-declaration
69 68 CERRWARN += -_gcc=-Wno-unused-label
70 69 CERRWARN += -_gcc=-Wno-unused-variable
71 70 CERRWARN += -_gcc=-Wno-extra
72 71 CERRWARN += -_gcc=-Wno-parentheses
73 72
74 73 # missing type declarations
75 74 SMATCH = off
76 75
77 76 .KEEP_STATE :
78 77
79 78 all : $(PROG) $(TXTS)
80 79
81 80 $(PROG) : $(OBJS)
82 81 $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
83 82 $(POST_PROCESS)
84 83
85 84 $(POFILE): $(POFILES)
86 85 $(RM) $@
87 86 $(CAT) $(POFILES) > $@
88 87
89 88 awk.g.c + awk.h : awk.g.y
90 89 $(RM) awk.g.c awk.h
91 90 $(YACC.y) awk.g.y
92 91 $(MV) y.tab.c awk.g.c
93 92 $(MV) y.tab.h awk.h
94 93
95 94 awk.lx.c: awk.lx.l
96 95 $(LEX.l) -w awk.lx.l > awk.lx.c
97 96
98 97 tmptoken.c : tokenscript token.c
99 98 $(RM) $@
100 99 ed - < tokenscript
101 100
102 101 proctab.c : $(MAKEPRCTAB)
103 102 $(RM) $@
104 103 $(MAKEPRCTAB) > $@
105 104
106 105 $(MAKEPRCTAB) : $(NATIVEDIR) $(NATIVEOBJS)
107 106 $(LINK.c) $(NATIVEOBJS) -o $@ $(XLDLIBS5CC)
108 107
109 108 install : all $(ROOTPROG) $(ROOTLINK)
110 109
111 110 $(NATIVEDIR) :
112 111 -@mkdir -p $(NATIVEDIR)
113 112
114 113 $(NATIVEDIR)/%.o : %.c
115 114 $(COMPILE.c) -o $@ $<
116 115
117 116 $(ROOTLINK) : $(ROOTPROG)
118 117 $(RM) $@; $(LN) $(ROOTPROG) $@
119 118
120 119 clean:
121 120 $(RM) $(OBJS) $(CLEANFILES)
122 121
123 122 lint : lint_SRCS
124 123
125 124 strip:
126 125 $(STRIP) $(PROG)
127 126
128 127 include ../Makefile.targ
↓ open down ↓ |
56 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX