v7: add a Makefile for the v7 games
authorAlan Cox <alan@linux.intel.com>
Thu, 20 Oct 2016 16:45:56 +0000 (17:45 +0100)
committerAlan Cox <alan@linux.intel.com>
Thu, 20 Oct 2016 16:45:56 +0000 (17:45 +0100)
Applications/V7/games/Makefile [new file with mode: 0644]

diff --git a/Applications/V7/games/Makefile b/Applications/V7/games/Makefile
new file mode 100644 (file)
index 0000000..43520aa
--- /dev/null
@@ -0,0 +1,54 @@
+CC = sdcc
+ASM = sdasz80
+AR = sdar
+LINKER = sdcc
+FCC = ../../../Library/tools/fcc
+FCCOPTS = -O2
+PLATFORM =
+#PLATFORM = -tzx128
+
+PROGLOAD=`(cat ../../../Kernel/platform/config.h; echo PROGLOAD) | cpp -E | tail -n1`
+
+.SUFFIXES: .c .rel
+
+SRCS  = arithmetic.c backgammon.c fish.c wump.c
+
+SRCSBAD =
+
+OBJS = $(SRCS:.c=.rel)
+OBJSNS = $(SRCSNS:.c=.rel)
+OBJSBAD = $(SRCSBAD:.c=.rel)
+
+LIBS = ../../../Library/libs/syslib.lib
+
+APPSNS = $(OBJSNS:.rel=)
+
+APPS = $(OBJS:.rel=) $(OBJSBAD:.rel=) $(OBJSNS:.rel=)
+
+all: $(APPS) sizes
+
+
+$(APPSNS): OPTS = --nostdio
+
+$(OBJS): %.rel: %.c
+
+$(OBJSNS): %.rel: %.c
+
+$(OBJSBAD): %.rel: %.c
+       $(FCC) $(PLATFORM) -c $<
+
+.c.rel:
+       $(FCC) $(PLATFORM) $(FCCOPTS) -c $<
+
+%: %.rel
+       $(FCC) $(PLATFORM) $(OPTS) $< -o $@
+
+sizes: $(APPS)
+       ls -l $(APPS) >size.report
+
+clean:
+       rm -f $(OBJS) $(APPS) $(SRCS:.c=) core *~ *.asm *.lst *.sym *.map *.noi *.lk *.ihx *.tmp *.bin size.report
+
+rmbak:
+       rm -f *~ core
+