From a13208b8c541b0975307652ebfe7583e263b1f55 Mon Sep 17 00:00:00 2001 From: salex Date: Mon, 24 Nov 2014 11:07:10 -0500 Subject: [PATCH] Fixed library and apps maker. --- Applications/util/Makefile | 10 +++++++--- Library/libs/Makefile | 6 +++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Applications/util/Makefile b/Applications/util/Makefile index ba0126ff..8c1ac13d 100644 --- a/Applications/util/Makefile +++ b/Applications/util/Makefile @@ -2,11 +2,14 @@ CC = sdcc ASM = sdasz80 AR = sdar LINKER = sdcc + +CODELOC= 0xC000 + #CC_OPT = -mz80 -c --opt-code-size --std-c89 --max-allocs-per-node 2000000 -I../../Library/include CC_OPT = -mz80 --std-c99 -c --opt-code-size --max-allocs-per-node 20000 -I../../Library/include #--oldralloc ASM_OPT = -l -o -s -LINKER_OPT = --code-loc 0 -mz80 --nostdlib --no-std-crt0 +LINKER_OPT = -mz80 --nostdlib --no-std-crt0 --code-loc $(CODELOC) --data-loc 0 .SUFFIXES: .c .rel @@ -82,10 +85,11 @@ $(OBJS): $(SRCS) $(CC) $(CC_OPT) $(@:.rel=.c) %: %.rel - $(LINKER) $(LINKER_OPT) ../../Library/libs/crt0.rel $< $(LIBS) + $(LINKER) $(LINKER_OPT) ../../Library/libs/crt0.rel $< $(LIBS) -o $@.ihx + hex2bin $@.ihx clean: - rm -f $(OBJS) $(APPS) core *~ *.asm *.lst *.sym *.map *.noi *.lk + rm -f $(OBJS) $(APPS) core *~ *.asm *.lst *.sym *.map *.noi *.lk *.ihx *.bin rmbak: rm -f *~ core diff --git a/Library/libs/Makefile b/Library/libs/Makefile index 18f9d90c..fcf44a57 100644 --- a/Library/libs/Makefile +++ b/Library/libs/Makefile @@ -68,6 +68,10 @@ syslib.lib: syscall.l libc.l sdccz80.lib $(AR) rc syslib.lib @syslib.l $(AR) s syslib.lib +fuzix/syslib.l: + ../tools/syscall + make -C fuzix + $(OBJ_ASM):%.rel: %.s $(ASM) $(ASM_OPT) $@ $(@:.rel=.s) @@ -79,5 +83,5 @@ $(OBJ_C):%.rel: %.c clean: - rm -rf *.rel *.asm *.sym *.lst *.lib *~ libc.l + rm -rf *.rel *.asm *.sym *.lst *.lib *~ syscall.l libc.l (cd fuzix; make clean) -- 2.34.1