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