dw: add Makefiles for Z80
authorAlan Cox <alan@linux.intel.com>
Thu, 2 Jun 2016 22:59:27 +0000 (23:59 +0100)
committerAlan Cox <alan@linux.intel.com>
Thu, 2 Jun 2016 22:59:27 +0000 (23:59 +0100)
Applications/dw/Makefile [new file with mode: 0644]

diff --git a/Applications/dw/Makefile b/Applications/dw/Makefile
new file mode 100644 (file)
index 0000000..bbbf3d5
--- /dev/null
@@ -0,0 +1,56 @@
+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
+
+SRCSNS =
+
+SRCS  = dw.c dwgetty.c dwterm.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
+