From 9c47c98313e4802e37362ffbcb2607fe925dbfa9 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Wed, 22 Nov 2017 17:54:08 +0000 Subject: [PATCH] 6502: Add V7 makefiles --- Applications/V7/cmd/Makefile.6502 | 8 +++++++- Applications/V7/cmd/sh/Makefile.6502 | 15 +++++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/Applications/V7/cmd/Makefile.6502 b/Applications/V7/cmd/Makefile.6502 index 55564257..2da02474 100644 --- a/Applications/V7/cmd/Makefile.6502 +++ b/Applications/V7/cmd/Makefile.6502 @@ -47,9 +47,15 @@ $(OBJSTC): %.o: %.c $(OBJSBAD): %.o: %.c -%: %.o +$(APPS): %: %.o $(LINKER) -o $@ $(LINKER_OPT) $(CRT0) $^ c6502.lib -m $@.map +$(APPSNS): %: %.o + $(LINKER) -o $@ $(LINKER_OPT) $(CRT0NS) $^ c6502.lib -m $@.map + +$(APPSTC): %: %.o + $(LINKER) -o $@ $(LINKER_OPT) $(CRT0) $^ termcap6502.lib c6502.lib -m $@.map + sizes: $(APPS) ls -l $(APPS) >size.report diff --git a/Applications/V7/cmd/sh/Makefile.6502 b/Applications/V7/cmd/sh/Makefile.6502 index 6a8df75e..871a91c3 100644 --- a/Applications/V7/cmd/sh/Makefile.6502 +++ b/Applications/V7/cmd/sh/Makefile.6502 @@ -1,6 +1,12 @@ CC = cl65 -PLATFORM = --target fuzixtg -#PLATFORM = -tzx128 +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 + .SUFFIXES: .c .o @@ -17,13 +23,10 @@ LIBS = ../../../../Library/libs/c6502.lib all: sh sh: $(OBJS) - $(CC) $(PLATFORM) ../../../../Library/libs/crt0_6502.o $(OBJS) $(LIBS) -o $@ + $(LINKER) -o $@ $(LINKER_OPT) $(CRT0) $^ c6502.lib -m $@.map $(OBJS): $(INCS) -.c.o: - $(CC) -O2 $(PLATFORM) -D __STDC__ -c -I ../../../../Library/include/6502 -I ../../../../Library/include $< - clean: rm -f $(OBJS) sh *~ core -- 2.34.1