aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorhpa <hpa@trantor.hos.anvin.org>2008-12-20 12:18:47 -0800
committerhpa <hpa@trantor.hos.anvin.org>2008-12-20 12:18:47 -0800
commit61268167fb3b04aa18e02259d99dae8dfc7684f1 (patch)
treed473bd33da1e849dd6fb6efa4bd6f140d95c0cba /tools
parent28b0de5001e4f7d085c856e89933eab660b16025 (diff)
downloadabc80-61268167fb3b04aa18e02259d99dae8dfc7684f1.tar.gz
abc80-61268167fb3b04aa18e02259d99dae8dfc7684f1.tar.xz
abc80-61268167fb3b04aa18e02259d99dae8dfc7684f1.zip
Initial port to DE1 card
Enough of a port to DE1 for it to pass synthesis, but it doesn't fit in the design due to the high consumption of memories. This needs to be addressed by using the external flash.
Diffstat (limited to 'tools')
-rw-r--r--tools/z80asm/Makefile32
1 files changed, 21 insertions, 11 deletions
diff --git a/tools/z80asm/Makefile b/tools/z80asm/Makefile
index a0a976d..b022c61 100644
--- a/tools/z80asm/Makefile
+++ b/tools/z80asm/Makefile
@@ -15,25 +15,35 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-CC = gcc
-LDFLAGS = -O2 -Wall
-CFLAGS = -O2 -Wall -Wwrite-strings -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline -Wshadow -g -W -Ignulib
-SHELL = /bin/bash
-VERSION ?= $(shell echo -n `cat VERSION | cut -d. -f1`. ; echo $$[`cat VERSION | cut -d. -f2` + 1])
+CC = gcc
+LDFLAGS = -O2 -Wall
+CFLAGS = -O2 -Wall -Wwrite-strings -Wcast-qual -Wcast-align \
+ -Wstrict-prototypes -Wmissing-prototypes \
+ -Wmissing-declarations -Wredundant-decls -Wnested-externs \
+ -Winline -Wshadow -g -W -Ignulib
+VERSION ?= $(shell echo -n `cat VERSION | cut -d. -f1`. ; echo $$[`cat VERSION | cut -d. -f2` + 1])
+ifneq (,$(findstring _NT,$(shell uname -s)))
+O = obj
+X = .exe
+else
+O = o
+X =
+endif
-all:z80asm
+all: z80asm$(X)
-z80asm:z80asm.c Makefile gnulib/getopt.o gnulib/getopt1.o
- $(CC) $(CFLAGS) $(LDFLAGS) -DVERSION=\"$(shell cat VERSION)\" $< gnulib/getopt.o gnulib/getopt1.o -o $@
+z80asm$(X): z80asm.c Makefile gnulib/getopt.$(O) gnulib/getopt1.$(O)
+ $(CC) $(CFLAGS) $(LDFLAGS) -DVERSION=\"$(shell cat VERSION)\" \
+ $< gnulib/getopt.$(O) gnulib/getopt1.$(O) -o $@
-gnulib/%.o:gnulib/%.c gnulib/getopt.h Makefile
+gnulib/%.$(O): gnulib/%.c gnulib/getopt.h Makefile
$(CC) $(CFLAGS) -c $< -o $@
clean:
for i in . gnulib examples headers ; do \
- rm -f $$i/core $$i/*~ $$i/\#* $$i/*.o $$i/*.rom ; \
+ rm -f $$i/core $$i/*~ $$i/\#* $$i/*.$(O) $$i/*.rom ; \
done
- rm -f z80asm z80asm.exe
+ rm -f z80asm$(X) z80asm.exe
dist: clean
echo $(VERSION) > VERSION