Print this page
8411 Build should warn when linking against libraries outside proto area
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 2017 RackTop Systems.
27 +#
26 28
27 29 include ../Makefile.cmd
28 30
29 31 PROG = oawk
30 32 LINKPROG = awk
31 33
32 34 SRCS = b.c lib.c main.c parse.c run.c tran.c
33 35
34 36 #TXTS = README EXPLAIN
35 37
36 38 OBJS = awk.g.o awk.lx.o proctab.o tmptoken.o \
37 39 $(SRCS:%.c=%.o)
38 40
39 41 #
40 42 # for message catalogue
41 43 #
42 44 POFILES= $(OBJS:%.o=%.po)
↓ open down ↓ |
7 lines elided |
↑ open up ↑ |
43 45 POFILE= oawk.po
44 46 XGETFLAGS += -a -x oawk.xcl
45 47
46 48 NATIVEDIR = native
47 49 MAKEPRCTAB = $(NATIVEDIR)/makeprctab
48 50
49 51 NATIVEOBJS = $(NATIVEDIR)/makeprctab.o $(NATIVEDIR)/tmptoken.o
50 52 $(MAKEPRCTAB) := CC = $(NATIVECC)
51 53 $(MAKEPRCTAB) := POST_PROCESS=
52 54 $(MAKEPRCTAB) := POST_PROCESS_O=
55 +$(MAKEPRCTAB) := ZASSERTDEFLIB=
53 56
54 57 CLEANFILES = proctab.c y.tab.h y.tab.c awk.h awk.g.c \
55 58 tmptoken.c awk.lx.c $(NATIVEOBJS) $(MAKEPRCTAB) \
56 59 temp
57 60
58 61 YFLAGS = -d
59 62 XLDLIBS5CC += -lm
60 63 LDLIBS += -lm
61 64 CPPFLAGS = -I. $(CPPFLAGS.master)
62 65 CPPFLAGS += -D_FILE_OFFSET_BITS=64
63 66
64 67 ROOTLINK = $(LINKPROG:%=$(ROOTBIN)/%)
65 68
66 69 CERRWARN += -_gcc=-Wno-implicit-function-declaration
67 70 CERRWARN += -_gcc=-Wno-unused-label
68 71 CERRWARN += -_gcc=-Wno-unused-variable
69 72 CERRWARN += -_gcc=-Wno-extra
70 73 CERRWARN += -_gcc=-Wno-parentheses
71 74
72 75 .KEEP_STATE :
73 76
74 77 all : $(PROG) $(TXTS)
75 78
76 79 $(PROG) : $(OBJS)
77 80 $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
78 81 $(POST_PROCESS)
79 82
80 83 $(POFILE): $(POFILES)
81 84 $(RM) $@
82 85 $(CAT) $(POFILES) > $@
83 86
84 87 awk.g.c + awk.h : awk.g.y
85 88 $(RM) awk.g.c awk.h
86 89 $(YACC.y) awk.g.y
87 90 $(MV) y.tab.c awk.g.c
88 91 $(MV) y.tab.h awk.h
89 92
90 93 awk.lx.c: awk.lx.l
91 94 $(LEX.l) -w awk.lx.l > awk.lx.c
92 95
93 96 tmptoken.c : tokenscript token.c
94 97 $(RM) $@
95 98 ed - < tokenscript
96 99
97 100 proctab.c : $(MAKEPRCTAB)
98 101 $(RM) $@
99 102 $(MAKEPRCTAB) > $@
100 103
101 104 $(MAKEPRCTAB) : $(NATIVEDIR) $(NATIVEOBJS)
102 105 $(LINK.c) $(NATIVEOBJS) -o $@ $(XLDLIBS5CC)
103 106
104 107 install : all $(ROOTPROG) $(ROOTLINK)
105 108
106 109 $(NATIVEDIR) :
107 110 -@mkdir -p $(NATIVEDIR)
108 111
109 112 $(NATIVEDIR)/%.o : %.c
110 113 $(COMPILE.c) -o $@ $<
111 114
112 115 $(ROOTLINK) : $(ROOTPROG)
113 116 $(RM) $@; $(LN) $(ROOTPROG) $@
114 117
115 118 clean:
116 119 $(RM) $(OBJS) $(CLEANFILES)
117 120
118 121 lint : lint_SRCS
119 122
120 123 strip:
121 124 $(STRIP) $(PROG)
122 125
123 126 include ../Makefile.targ
↓ open down ↓ |
61 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX