summaryrefslogtreecommitdiff
path: root/misc/sims/z80sim/src/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'misc/sims/z80sim/src/Makefile')
-rw-r--r--misc/sims/z80sim/src/Makefile27
1 files changed, 17 insertions, 10 deletions
diff --git a/misc/sims/z80sim/src/Makefile b/misc/sims/z80sim/src/Makefile
index c673f5803..0b68816c7 100644
--- a/misc/sims/z80sim/src/Makefile
+++ b/misc/sims/z80sim/src/Makefile
@@ -1,15 +1,20 @@
-CC = gcc
-CFLAGS = -g -Wall -IZ80 -DLSB_FIRST=1 -DDEBUG=1 -DJUMPZ80
+Z80SITE = http://fms.komkon.org/EMUL8
+Z80SOURCE = Z80-081707.zip
+Z80UNZIP = /usr/bin/unzip
+Z80WGET = /usr/bin/wget
-LD = gcc
-LDFLAGS =
+CC = gcc
+CFLAGS = -g -Wall -IZ80 -DLSB_FIRST=1 -DDEBUG=1 -DJUMPZ80
-SRCS = main.c Debug.c Z80.c
-OBJS = $(SRCS:.c=.o)
+LD = gcc
+LDFLAGS =
-BIN = z80sim
+SRCS = main.c Debug.c Z80.c
+OBJS = $(SRCS:.c=.o)
-VPATH = Z80
+BIN = z80sim
+
+VPATH = Z80
all: $(BIN)
default: $(BIN)
@@ -17,9 +22,11 @@ default: $(BIN)
$(OBJS): %.o: %.c
$(CC) -c $(CFLAGS) $< -o $@
+Z80-081707.zip:
+ $(Z80WGET) $(Z80SITE)/$(Z80SOURCE)
Z80: Z80-081707.zip
- unzip Z80-081707.zip
+ $(Z80UNZIP) Z80-081707.zip
z80sim: Z80 $(OBJS)
$(LD) $(LDFLAGS) $(OBJS) -o $@
@@ -28,5 +35,5 @@ clean:
@rm -f $(BIN) *.o *.rel *.asm *.lst *.sym *.adb *~
distclean: clean
- rm -rf Z80
+ rm -rf Z80 Z80-081707.zip