1 #######################################################
3 # a56 - a DSP56001 assembler
5 # Written by Quinn C. Jensen
8 #######################################################
10 # Copyright (C) 2012 Thorsten Alteholz <debian@alteholz.de>
12 # This file is free software: you can redistribute it and/or modify
13 # it under the terms of the GNU General Public License as published
14 # by the Free Software Foundation, either version 3 of the License,
15 # or (at your option) any later version.
17 # This program is distributed in the hope that it will be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 # General Public License for more details.
22 # You should have received a copy of the GNU General Public License
23 # along with this program. If not, see
24 # <http://www.gnu.org/licenses/>.
26 # This file incorporates work covered by the following copyright and
29 # Copyright (C) 1990-1998 Quinn C. Jensen
31 # Permission to use, copy, modify, distribute, and sell this
32 # software and its documentation for any purpose is hereby granted
33 # without fee, provided that the above copyright notice appear in all
34 # copies and that both that copyright notice and this permission
35 # notice appear in supporting documentation. The author makes no
36 # representations about the suitability of this software for any
37 # purpose. It is provided "as is" without express or implied
40 # environment definitions
41 # uncomment the ones you like
63 # Delorie's DOS gcc (from ftp://omnigate.clarkson.edu/pub/msdos/djgpp)
71 #POSTPROCESS = coff2exe
73 # gcc cross-compile to go32 environment
83 #######################################################
86 #DEBUG = -O -Olimit 3000
89 SRCS = main.c a56.y lex.c subs.c getopt.c kparse.key
90 OBJS = main.o gram.o lex.o toktab.o subs.o getopt.o kparse.o
93 #DEFINES = -DYYDEBUG -DLDEBUG $(CCDEFS)
95 CFLAGS = $(DEBUG) $(DEFINES) $(CPPFLAGS) $(LDFLAGS)
100 $(CC) $(CFLAGS) -o a56 $(OBJS) -lm
103 keybld: keybld.o ksubs.o
104 $(HOSTCC) $(CFLAGS) -o keybld keybld.o ksubs.o
105 @$(POSTPROCESS) keybld
108 $(HOSTCC) $(CFLAGS) -c keybld.c
111 $(HOSTCC) $(CFLAGS) -c subs.c
116 kparse.c: a56.key keybld
117 ./keybld < a56.key > kparse.c
120 @echo "[expect 2 shift/reduce conflicts here]"
122 $(MV) $(YTABC) gram.c
123 $(MV) $(YTABH) gram.h
126 awk -f tok.awk < gram.h > toktab.c
132 $(CC) -o toomf $(CFLAGS) toomf.o
133 @$(POSTPROCESS) toomf
135 torom: torom.o subs.o
136 $(CC) -o torom $(CFLAGS) torom.o subs.o
139 csh -c 'tar cvbf 1 - `cat files` | gzip > a56.tar.gz'
141 main.o gram.o lex.o: a56.h
143 clean: ; rm -f a56 toomf y.output *.o *.out tmp *.bak a56.tar.gz keybld
146 rm -f gram.c lexyy.c gram.h toktab.c kparse.c