BSD 3 development
[unix-history] / usr / src / cmd / as / Makefile
CommitLineData
e6baf593
JR
1LOCAL = /usr/ucb/
2
3#
4# as.h Definitions for data structures
5# asscan.h Definitions for the character scanner
6# astoks.h The defines for tokens that yacc produced
7# included implicitly in as.h
8# asexpr.h The macros for parsing and expressions
9# assyms.h Macros for dealing with the symbol table
10#
11# asscan.c lexical analyzer and the character scanner
12# asparse.c parser
13# asexpr.c parses expressions, constructs and evaluates
14# expression trees
15#
16# asmain.c main body
17# assyms.c symbol table processing routines
18# asjxxx.c Fixes jxxx instructions
19# ascode.c Emits code
20#
21# aspseudo.c Symbol table definitions for reserved words
22# instrs included in pseudo.c; instructions and semantic info
23# for each instructions
24#
25
26HDRS = astoks.h as.h asscan.h assyms.h asexpr.h
27
28SRCS = asscan.c asparse.c asexpr.c \
29 asmain.c assyms.c \
30 asjxxx.c ascode.c aspseudo.c
31
32SRCS1= asscan.c asparse.c asexpr.c
33
34SRCS2 = asmain.c assyms.c asjxxx.c ascode.c aspseudo.c instrs
35
36OBJS = asscan.o asparse.o asexpr.o \
37 asmain.o assyms.o \
38 asjxxx.o ascode.o aspseudo.o
39
40DESTDIR =
41
42#
43# available flags:
44#
45# SORTEDOUTPUT create the final a.out symbol table sorted by
46# (segment number, value) keys, instead of
47# by declaration order. SDB currently requires
48# the symbol table to be in declaration order.
49# METRIC print out number of times the hashing routine is called
50# DEBUG print out various debugging information
51# in the first pass
52#
53#
54
55CFLAGS= -O
56LINTFLAGS =
57
58as: $(OBJS)
59 $(CC) $(OBJS)
60 mv a.out as
61
62lint:
63 lint $(LINTFLAGS) $(SRCS)
64
65asscan.o : as.h astoks.h asexpr.h asscan.h asscan.c
66 $(CC) $(CFLAGS) -c asscan.c
67
68asparse.o: as.h astoks.h asexpr.h asscan.h asparse.c
69 $(CC) $(CFLAGS) -c asparse.c
70
71asexpr.o: as.h astoks.h asexpr.h asexpr.c
72 $(CC) $(CFLAGS) -c asexpr.c
73
74asmain.o : as.h astoks.h asexpr.h assyms.h asmain.c
75 $(CC) $(CFLAGS) -c asmain.c
76
77assyms.o: as.h astoks.h assyms.h assyms.c
78 $(CC) $(CFLAGS) -c assyms.c
79
80asjxxx.o: as.h astoks.h assyms.h asjxxx.c
81 $(CC) $(CFLAGS) -c asjxxx.c
82
83ascode.o: as.h astoks.h assyms.h ascode.c
84 $(CC) $(CFLAGS) -c ascode.c
85
86aspseudo.o : as.h astoks.h aspseudo.c instrs
87 $(CC) -S $(CFLAGS) aspseudo.c
88 :rofix aspseudo.s
89 $(AS) -o aspseudo.o aspseudo.s
90 rm aspseudo.s
91
92clean:
93 rm -f $(OBJS) as
94
95netprint:
96 pr $(HDRS) $(SRCS1) > as1.pr
97 pr $(SRCS2) > as2.pr
98 netcp as1.pr Cory:netbin/as1.pr
99 netcp as2.pr Cory:netbin/as2.pr
100 rm as1.pr
101 rm as2.pr
102
103print:
104 pr $(HDRS) $(SRCS)
105
106vprint:
107 vgrind $(HDRS) $(SRCS)
108
109install:
110 install -s as ${DESTDIR}/bin/as