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