From 51c2ad8cfdd138543959d9940aef6f699f966292 Mon Sep 17 00:00:00 2001 From: Olaf Barthel Date: Sat, 14 Aug 2004 15:01:22 +0000 Subject: [PATCH] - Added a build makefile for GCC/68k. git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14710 87f5fb63-7c3d-0410-a384-fd976d0f7a62 --- test_programs/GNUmakefile.68k | 90 +++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 test_programs/GNUmakefile.68k diff --git a/test_programs/GNUmakefile.68k b/test_programs/GNUmakefile.68k new file mode 100644 index 0000000..9b09a82 --- /dev/null +++ b/test_programs/GNUmakefile.68k @@ -0,0 +1,90 @@ +# +# $Id: GNUmakefile.68k,v 1.1 2004-08-14 15:01:22 obarthel Exp $ +# +# :ts=8 +# + +############################################################################## + +CC = gcc +DELETE = delete all quiet + +############################################################################## + +.c.o: + @echo "Compiling $<" + @$(CC) -c $(CFLAGS) $< + +############################################################################## + +#CODE_TYPE := -fbaserel -DSMALL_DATA -m68020-60 -DM68020 +#CODE_TYPE := -fbaserel -DSMALL_DATA -m68000 +#CODE_TYPE := -fbaserel32 -DSMALL_DATA32 -m68020-60 -DM68020 + CODE_TYPE := -m68020-60 -DM68020 +#CODE_TYPE := -m68000 + +############################################################################## + +WARNINGS = \ + -Wall -W -Wshadow -Wpointer-arith -Wsign-compare -Wmissing-prototypes \ + -Wundef -Wbad-function-cast -Wmissing-declarations -Wconversion + +INCLUDE = -I../library/include +LIB = -L../library/lib + OPTIONS = -DNDEBUG -fno-builtin -DNO_INLINE_STDARG -DIEEE_FLOATING_POINT_SUPPORT +#OPTIONS = -D__MEM_DEBUG -fno-builtin +#OPTIONS = -DDEBUG -D__MEM_DEBUG -DNO_INLINE_STDARG -fno-builtin + OPTIMIZE = -O +#OPTIMIZE = -O2 -fomit-frame-pointer +#DEBUG = -g2 + +CFLAGS = $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(CODE_TYPE) $(INCLUDE) $(LIB) + +############################################################################## + +LIBS = -lm -lc -lgcc + +############################################################################## + +all: test fgets_test iotest sscanf_test printf_test stack_size_test translate_test + +clean: + $(DELETE) #?.o #?.map test fgets_test iotest sscanf_test printf_test stack_size_test translate_test + +############################################################################## + +test : test.o + @echo "Linking $@" + $(CC) $(CFLAGS) -o $@ test.o $(LIBS) -Wl,--cref,-M,-Map=$@.map + +fgets_test : fgets_test.o + @echo "Linking $@" + $(CC) $(CFLAGS) -o $@ fgets_test.o $(LIBS) -Wl,--cref,-M,-Map=$@.map + +iotest : iotest.o + @echo "Linking $@" + $(CC) $(CFLAGS) -o $@ iotest.o $(LIBS) -Wl,--cref,-M,-Map=$@.map + +sscanf_test : sscanf_test.o + @echo "Linking $@" + $(CC) $(CFLAGS) -o $@ sscanf_test.o $(LIBS) -Wl,--cref,-M,-Map=$@.map + +printf_test : printf_test.o + @echo "Linking $@" + $(CC) $(CFLAGS) -o $@ printf_test.o $(LIBS) -Wl,--cref,-M,-Map=$@.map + +stack_size_test : stack_size_test.o + @echo "Linking $@" + $(CC) $(CFLAGS) -o $@ stack_size_test.o $(LIBS) -Wl,--cref,-M,-Map=$@.map + +translate_test : translate_test.o + @echo "Linking $@" + $(CC) $(CFLAGS) -o $@ translate_test.o -lunix $(LIBS) -Wl,--cref,-M,-Map=$@.map + +############################################################################## + +mkid: + mkid -v #?.(c|h|asm|i) + +update: + mkid -v -u