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# 6# @(#)Makefile 1.3 (Berkeley) 05/10/89 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# 43HDRS= astoks.H astokfix.awk as.h asscan.h assyms.h asexpr.h 44SRCS= 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 46OBJS= 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 48GRIND = 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 \ 50 asmain.c asscan.c asparse.c asexpr.c assyms.c asjxxx.c ascode.c \ 51 asio.c assizetab.c aspseudo.c 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# 76DFLAGS= -DAS 77CFLAGS= -O $(DFLAGS) 78 79all: as 80 81as: ${OBJS} ${LIBC} 82 ${CC} ${CFLAGS} ${OBJS} -o $@ 83 84astoks.h: astoks.H astokfix.awk 85 awk -f astokfix.awk < astoks.H > astoks.h 86 87aspseudo.o: as.h astoks.h aspseudo.c instrs.h instrs.as 88 ${CC} -c -R ${DFLAGS} aspseudo.c 89 90instrs.as: instrs 91 (echo FLAVOR AS ; cat instrs) | awk -f instrs > instrs.as 92 93clean: 94 rm -f ${OBJS} core as 95 96cleandir: clean 97 rm -f ${MAN} tags .depend 98 99depend: ${SRCS} 100 mkdep ${CFLAGS} ${SRCS} 101 102install: ${MAN} 103 install -s -o bin -g bin as ${DESTDIR}/usr/bin 104 105lint: ${SRCS} 106 lint ${CFLAGS} ${SRCS} 107 108tags: ${SRCS} 109 ctags ${SRCS} 110