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 =
# 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)
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)
$(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