aboutsummaryrefslogtreecommitdiffstats
path: root/tools/z80asm/Makefile
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2014-05-08 07:04:00 -0700
committerH. Peter Anvin <hpa@zytor.com>2014-05-08 07:04:00 -0700
commitd40c2b25e9ebb5ca6c608025b1880a6278af7d66 (patch)
tree8d4611e688ebe5c3c38e9a0b9aed2e8aa4cb39e4 /tools/z80asm/Makefile
parentb9e993537698f75deb043eef58880b8f9d8bb9a0 (diff)
downloadabc80-d40c2b25e9ebb5ca6c608025b1880a6278af7d66.tar.gz
abc80-d40c2b25e9ebb5ca6c608025b1880a6278af7d66.tar.xz
abc80-d40c2b25e9ebb5ca6c608025b1880a6278af7d66.zip
z80asm: Upgrade to a new upstream version
Unfortunate the upstream version doesn't handle "-l filename" correctly (needs "-lfilename"). Fix a bug in keyboard.asm the old assembler handled. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'tools/z80asm/Makefile')
-rw-r--r--tools/z80asm/Makefile64
1 files changed, 30 insertions, 34 deletions
diff --git a/tools/z80asm/Makefile b/tools/z80asm/Makefile
index b022c61..0e01daa 100644
--- a/tools/z80asm/Makefile
+++ b/tools/z80asm/Makefile
@@ -1,54 +1,50 @@
# Makefile for the Z80 assembler by shevek
-# Copyright (C) 2002-2005 Bas Wijnen
+# Copyright 2002-2007 Bas Wijnen
#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
+# This file is part of z80asm.
#
-# This program is distributed in the hope that it will be useful,
+# Z80asm is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# Z80asm is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
-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
+CC = gcc
+CFLAGS = -O2 -Wall -Wwrite-strings -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline -pedantic -ansi -Wshadow -ggdb3 -W -Ignulib
+SHELL = /bin/bash
+VERSION ?= $(shell echo -n `cat VERSION | cut -d. -f1`. ; echo $$[`cat VERSION | cut -d. -f2` + 1])
-all: z80asm$(X)
+all:z80asm
-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 $@
+z80asm: z80asm.o expressions.o Makefile gnulib/getopt.o gnulib/getopt1.o
+ $(CC) $(LDFLAGS) $(filter %.o,$^) -o $@
+ $(MAKE) -C tests || rm $@
-gnulib/%.$(O): gnulib/%.c gnulib/getopt.h Makefile
- $(CC) $(CFLAGS) -c $< -o $@
+%.o:%.c z80asm.h gnulib/getopt.h Makefile
+ $(CC) $(CFLAGS) -c $< -o $@ -DVERSION=\"$(shell cat VERSION)\"
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$(X) z80asm.exe
+ rm -f z80asm z80asm.exe
dist: clean
+ ! git status | grep modified
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
- mv /tmp/z80asm /tmp/z80asm-$(VERSION)
+ git add VERSION
+ -git commit -m "Release version $(VERSION)"
+ rm -rf /tmp/z80asm-$(VERSION)
+ git archive --format=tar --prefix=z80asm-$(VERSION)/ HEAD | tar xf - -C /tmp
tar cvzf ../z80asm-$(VERSION).tar.gz -C /tmp z80asm-$(VERSION)
+ rm -r /tmp/z80asm-$(VERSION)
+ cd .. && gpg -b z80asm-$(VERSION).tar.gz
+ scp ../z80asm-$(VERSION).tar.gz* dl.sv.nongnu.org:/releases/z80asm/
+ git push