ue: add 6502 build rules
authorAlan Cox <alan@linux.intel.com>
Sat, 7 Jul 2018 14:10:47 +0000 (15:10 +0100)
committerAlan Cox <alan@linux.intel.com>
Sat, 7 Jul 2018 14:10:47 +0000 (15:10 +0100)
Applications/ue/Makefile.6502 [new file with mode: 0644]

diff --git a/Applications/ue/Makefile.6502 b/Applications/ue/Makefile.6502
new file mode 100644 (file)
index 0000000..b9b1a94
--- /dev/null
@@ -0,0 +1,32 @@
+PLATFORM = 6502
+CC = cl65
+ASM = ca65
+LINKER = cl65
+CFLAGS = -t none -O -D__STDC__ -c -O -I../../Library/include -I../../Library/include/6502
+LINKER_OPT = -L../../Library/libs -C ../../Library/libs/ld65-$(TARGET).cfg
+ASM_OPT = -o
+CRT0 = ../../Library/libs/crt0_6502.o
+CRT0NS = ../../Library/libs/crt0nostdio_6502.o
+
+OBJS = ue.o
+LIBS = term-ansi.c term-fuzix.c term.c
+
+all: ue.fuzix ue.ansi ue
+
+$(OBJS): ue.h
+$(LIBS): ue.h
+
+.c.o:
+       $(CC) $(COPT) $(CFLAGS) $(DEFS) -c $< -o $@
+
+ue.fuzix: $(OBJS) term-fuzix.o
+       $(LINKER) -o $@ $(LINKER_OPT) $(CRT0NS) $^ c6502.lib -m $@.map
+
+ue.ansi: $(OBJS) term-ansi.o
+       $(LINKER) -o $@ $(LINKER_OPT) $(CRT0NS) $^ c6502.lib -m $@.map
+
+ue: $(OBJS) term.o
+       $(LINKER) -o $@ $(LINKER_OPT) $(CRT0) $^ termcap6502.lib c6502.lib
+
+clean realclean clobber:
+       rm -f *.rel ue *~