Commit | Line | Data |
---|---|---|
7d98aa36 RH |
1 | LOCAL = /usr/ucb/ |
2 | ||
3 | # | |
4 | # as.h Definitions for data structures | |
5 | # asnumber.h Definitions for all numbers: byte .. G format float | |
6 | # asscan.h Definitions for the character scanner | |
7 | # asscanl.h Definitions for the character scanner; | |
8 | # local to asscan?.c | |
9 | # astokfix.awk | |
10 | # astoks.H The defines for tokens that yacc produced | |
11 | # This is processed by astokfix.awk to yield: | |
12 | # astoks.h Included implicitly in as.h | |
13 | # asexpr.h The macros for parsing and expressions | |
14 | # assyms.h Macros for dealing with the symbol table | |
15 | # instrs.h Definitions to make instrs more readable | |
16 | # | |
17 | # asscan1.c buffer management, yylex, and buffer drainer | |
18 | # asscan2.c character scanner, and buffer filler | |
19 | # asscan3.c character sets definitions (initialized data) | |
20 | # asscan4.c constructs normal integers; interfaces with bignum?.c | |
21 | # | |
22 | # bignum1.c constructs large integers; utility routines | |
23 | # bignum2.c packs/unpacks floating point numbers | |
24 | # natof.c constructs large floating point #'s, ala atof | |
25 | # | |
26 | # asparse.c parser | |
27 | # asexpr.c parses expressions, constructs and evaluates | |
28 | # expression trees | |
29 | # | |
30 | # asmain.c main body | |
31 | # assyms.c symbol table processing routines | |
32 | # asjxxx.c Fixes jxxx instructions | |
33 | # ascode.c Emits code | |
34 | # assizetab.c Converts internal ordinal #'s into sizes, strings, etc | |
35 | # asio.c Does block I/O and faster versions of fwrite | |
36 | # | |
37 | # aspseudo.c Symbol table definitions for reserved words | |
38 | # instrs included in pseudo.c; instructions and semantic info | |
39 | # for each instructions | |
40 | # | |
41 | ||
42 | HDRS = astoks.H astokfix.awk as.h asscan.h assyms.h asexpr.h | |
43 | ||
44 | SRCS = asscan1.c asscan2.c asscan3.c asscan4.c \ | |
45 | bignum1.c bignum2.c natof.c floattab.c \ | |
46 | asmain.c asparse.c \ | |
47 | asexpr.c assyms.c \ | |
48 | asjxxx.c ascode.c aspseudo.c \ | |
49 | assizetab.c asio.c | |
50 | ||
51 | OBJS = asscan1.o asscan2.o asscan3.o asscan4.o \ | |
52 | bignum1.o bignum2.o natof.o floattab.o\ | |
53 | asparse.o asexpr.o \ | |
54 | asmain.o assyms.o \ | |
55 | asjxxx.o ascode.o aspseudo.o \ | |
56 | assizetab.o asio.o | |
57 | ||
58 | GRIND = astoks.h as.h asscan.h assyms.h asexpr.h instrs.h asnumber.h \ | |
59 | asscanl.h asscan1.c asscan2.c asscan3.c asscan4.c \ | |
60 | bignum1.c bignum2.c natof.c floattab.c \ | |
61 | asmain.c asscan.c asparse.c asexpr.c \ | |
62 | assyms.c asjxxx.c ascode.c asio.c \ | |
63 | assizetab.c aspseudo.c | |
64 | ||
65 | DESTDIR = | |
66 | ||
67 | # | |
68 | # available flags: | |
69 | # | |
70 | # AS This is the assembler; always set | |
71 | # (UNIX and VMS are mutually exclusive.) | |
72 | # UNIX Must be set if the assembler is to produce a.out | |
73 | # files for UNIX. | |
74 | # | |
75 | # VMS Must be set if the assembler is to produce executables | |
76 | # for VMS (Thanks to David Kashtan, SRI for these fixes) | |
77 | # | |
78 | # if VMS is set, then these two flags are also valid: | |
79 | # (necessary to frob system calls and '$' conventions | |
80 | # VMSDEVEL The assembler is being compiled under VMS | |
81 | # UNIXDEVEL The assembler is being compiled under UNIX | |
82 | # | |
83 | # | |
84 | # DEBUG print out various debugging information | |
85 | # in the first pass | |
86 | # | |
87 | # FLEXNAMES All names are stored internally as true character | |
88 | # strings, null terminated, and can be no more | |
89 | # than BUFSIZ long. | |
90 | # | |
91 | ||
92 | LD = /bin/ld | |
93 | ||
94 | DFLAGS= -DAS -DUNIX -DUNIXDEVEL -DFLEXNAMES | |
95 | CFLAGS = -O $(DFLAGS) | |
96 | ||
97 | LDFLAGS = -O | |
98 | ||
99 | as: $(OBJS) | |
100 | $(CC) $(LDFLAGS) $(OBJS) -o as | |
101 | ||
102 | .c.o: astoks.h | |
103 | $(CC) $(CFLAGS) -c $*.c | |
104 | ||
105 | astoks.h: astoks.H astokfix.awk | |
106 | awk -f astokfix.awk < astoks.H > astoks.h | |
107 | ||
108 | aspseudo.o: as.h astoks.h aspseudo.c instrs.h instrs.as | |
109 | $(CC) -S $(CFLAGS) aspseudo.c | |
110 | sh ./:rofix aspseudo.s | |
111 | $(AS) -o aspseudo.o aspseudo.s | |
112 | rm aspseudo.s | |
113 | ||
114 | instrs.as: instrs | |
115 | (echo FLAVOR AS ; cat instrs) | awk -f instrs > instrs.as | |
116 | ||
117 | lint: | |
118 | lint $(DFLAGS) $(SRCS) | |
119 | clean: | |
120 | rm -f $(OBJS) as | |
121 | install: | |
122 | install -s as ${DESTDIR}/bin | |
123 | ||
124 | print: | |
125 | pr Makefile $(HDRS) $(SRCS) | |
126 | ||
127 | sources: ${SRCS} ${HDRS} | |
128 | ${SRCS} ${HDRS}: | |
129 | sccs get $@ |