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