From f256fc6b03bb948a702f7725a1b7f1278b61a9f7 Mon Sep 17 00:00:00 2001 From: Tormod Volden Date: Tue, 14 Apr 2015 23:23:13 +0200 Subject: [PATCH] 6809 libs: Use our str* and mem* functions We will not be using the gcc stdlib when building userland utilities. And rename our own "libc" so that lwlink can find it. Signed-off-by: Tormod Volden --- Library/libs/Makefile.6809 | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/Library/libs/Makefile.6809 b/Library/libs/Makefile.6809 index a571c97b..efbb0123 100644 --- a/Library/libs/Makefile.6809 +++ b/Library/libs/Makefile.6809 @@ -1,14 +1,12 @@ CC = m6809-unknown-gcc ASM = m6809-unknown-as AR = m6809-unknown-ar -LINKER = m6809-unknown-ld PLATFORM = 6809 export PLATFORM CC_OPT = -c -Os -I../include -I../include/6502 # for stuff that gives sdcc nightmares CC_NOOPT = $(CC_OPT) ASM_OPT = -o -LINKER_OPT = SRC_CRT0 = crt0_$(PLATFORM).s OBJ_CRT0 = $(SRC_CRT0:.s=.o) SRC_ASM = @@ -52,10 +50,10 @@ SRC_HARD += regexp.c # Not supported yet #SRC_C += initgroups.c # Pieces we inherit in this case from the compiler library instead -#SRC_C += strcpy.c strlen.c abs.c atof.c atoi.c atol.c labs.c -#SRC_C += strcat.c strchr.c strcmp.c strcspn.c strncat.c strncmp.c -#SRC_C += strncpy.c strpbrk.c strrchr.c strspn.c strstr.c strtok.c -#SRC_C += memchr.c memcmp.c memcpy.c memset.c +SRC_C += strcpy.c strlen.c abs.c atof.c atoi.c atol.c labs.c +SRC_C += strcat.c strchr.c strcmp.c strcspn.c strncat.c strncmp.c +SRC_C += strncpy.c strpbrk.c strrchr.c strspn.c strstr.c strtok.c +SRC_C += memchr.c memcmp.c memcpy.c memset.c memmove.c OBJ_C = $(SRC_C:.c=.o) OBJ_HARD = $(SRC_HARD:.c=.o) @@ -74,7 +72,7 @@ syscall.l: fuzix$(PLATFORM)/syslib.l syslib$(PLATFORM).lib: syscall.l libc.l cat libc.l syscall.l >syslib.l $(AR) -c syslib$(PLATFORM).lib $$(cat syslib.l) - ln -sf syslib$(PLATFORM).lib c$(PLATFORM).lib + ln -sf syslib$(PLATFORM).lib libc$(PLATFORM).a fuzix$(PLATFORM)/syslib.l: ../tools/syscall_$(PLATFORM) @@ -93,6 +91,7 @@ $(OBJ_HARD):%.o: %.c $(CC) $(CC_NOOPT) $(@:.o=.c) clean: - rm -rf *.o *.asm *.sym *.lst *.lib *~ syscall.l libc.l syslib.l - (cd fuzix$(PLATFORM); make clean) + rm -rf *.o *.asm *.sym *.lst *.lib *~ syscall.l libc.l syslib.l \ + libc$(PLATFORM).a + -cd fuzix$(PLATFORM) && make clean rm -rf fuzix$(PLATFORM)/Makefile -- 2.34.1