aboutsummaryrefslogtreecommitdiffstats
path: root/tools/z80asm/Makefile
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2006-03-12 01:33:55 +0000
committerH. Peter Anvin <hpa@zytor.com>2006-03-12 01:33:55 +0000
commit1698cc676f74e047645899c95ca0e15a0ed31cda (patch)
treedb55ac5c3e213763f74b2f3b38a6f3b11abe3c52 /tools/z80asm/Makefile
parent157a2b515a90d69d418b7fa4dc26125de1a6b302 (diff)
downloadabc80-1698cc676f74e047645899c95ca0e15a0ed31cda.tar.gz
abc80-1698cc676f74e047645899c95ca0e15a0ed31cda.tar.xz
abc80-1698cc676f74e047645899c95ca0e15a0ed31cda.zip
Update z80asm
Diffstat (limited to 'tools/z80asm/Makefile')
-rw-r--r--tools/z80asm/Makefile20
1 files changed, 12 insertions, 8 deletions
diff --git a/tools/z80asm/Makefile b/tools/z80asm/Makefile
index 75c8011..a0a976d 100644
--- a/tools/z80asm/Makefile
+++ b/tools/z80asm/Makefile
@@ -1,5 +1,5 @@
# Makefile for the Z80 assembler by shevek
-# Copyright (C) 2002,2004 Bas Wijnen
+# Copyright (C) 2002-2005 Bas Wijnen
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -16,25 +16,29 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
CC = gcc
-LDFLAGS = -g -O2 -Wall
-CFLAGS = -g -O2 -Wall -Wwrite-strings -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline -pedantic -ansi -Wshadow -g -W -Ignulib
+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])
all:z80asm
z80asm:z80asm.c Makefile gnulib/getopt.o gnulib/getopt1.o
- $(CC) $(CFLAGS) $(LDFLAGS) $< gnulib/getopt.o gnulib/getopt1.o -o $@
+ $(CC) $(CFLAGS) $(LDFLAGS) -DVERSION=\"$(shell cat VERSION)\" $< gnulib/getopt.o gnulib/getopt1.o -o $@
gnulib/%.o:gnulib/%.c gnulib/getopt.h Makefile
$(CC) $(CFLAGS) -c $< -o $@
clean:
- for i in . gnulib ; do \
- rm -f $$i/a.bin $$i/a.out $$i/core $$i/*~ $$i/\#* $$i/*.o ; \
+ for i in . gnulib examples headers ; do \
+ rm -f $$i/core $$i/*~ $$i/\#* $$i/*.o $$i/*.rom ; \
done
rm -f z80asm z80asm.exe
dist: clean
- rm -rf /tmp/z80asm
+ echo $(VERSION) > VERSION
+ rm -rf /tmp/z80asm-$(VERSION) /tmp/z80asm
tar cf - -C .. z80asm | tar xf - -C /tmp
find /tmp/z80asm -name CVS | xargs rm -rf
- tar cvzf ../z80asm-`date +%Y%m%d`00.tar.gz -C /tmp z80asm
+ mv /tmp/z80asm /tmp/z80asm-$(VERSION)
+ tar cvzf ../z80asm-$(VERSION).tar.gz -C /tmp z80asm-$(VERSION)