From da3aaaf3649ef817fddb494d088ea2fd69d92fbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Fr=C3=B6schle?= Date: Sun, 14 Oct 2012 06:45:34 +0000 Subject: [PATCH] fixed CFLAGS according to Vincent's suggestions --- BaS_GNU/BaS_GNU/Makefile | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/BaS_GNU/BaS_GNU/Makefile b/BaS_GNU/BaS_GNU/Makefile index 210d499..01e2deb 100644 --- a/BaS_GNU/BaS_GNU/Makefile +++ b/BaS_GNU/BaS_GNU/Makefile @@ -9,17 +9,27 @@ # the m68k-elf version which also allows to use gdb together with bdm tools for debugging # +# This Makefile is meant for cross compiling the BaS with Vincent Riviere's cross compilers. +# If you want to compile native on an Atari (you will need at least GCC 4.6.3), set +# TCPREFIX to be empty. TCPREFIX=m68k-atari-mint- CC=$(TCPREFIX)gcc LD=$(TCPREFIX)ld INCLUDE=-Iinclude -CFLAGS=-mcfv4e -Wno-multichar -Os -Wa,-mcpu=547x -fomit-frame-pointer -#CFLAGS=-mcfv4e -Wno-multichar -S -O3 -fomit-frame-pointer +CFLAGS=-mcpu=5475 -Wno-multichar -Os -fomit-frame-pointer + SRCDIR=sources OBJDIR=objs +MAPFILE=bas.map + +# Linker control files. flash.lk is meant for BaS in flash, ram.lk (not written yet) for +# debugging in RAM. +LDCFILE=flash.lk +# LDCFILE=ram.lk + EXEC=bas.hex CSRCS= \ @@ -43,14 +53,11 @@ OBJS=$(COBJS) $(AOBJS) all: $(EXEC) -SADDR=0xe0000000 - $(EXEC): $(OBJS) - $(LD) --oformat srec -Map $@.map --cref -T flash.lk -s -o $@ $(OBJS) - echo "generating executable" + $(LD) --oformat srec -Map $(MAPFILE) --cref -T flash.lk -s -o $@ $(OBJS) clean: - rm $(EXEC) $(OBJS) + @ rm -f $(EXEC) $(OBJS) $(MAPFILE) $(OBJDIR)/%.o:$(SRCDIR)/%.c $(CC) -c $(CFLAGS) $(INCLUDE) $< -o $@