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