From 724eb85c1fbedaaca32bddfcfd68d26ea2e4a528 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Fr=C3=B6schle?= Date: Tue, 16 Oct 2012 09:23:09 +0000 Subject: [PATCH] added -mbitfield to init_fpga.o, it now compiles to nearly the same code than Fredi wrote. --- BaS_GNU/Makefile | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/BaS_GNU/Makefile b/BaS_GNU/Makefile index dc9007a..b15a130 100644 --- a/BaS_GNU/Makefile +++ b/BaS_GNU/Makefile @@ -18,7 +18,7 @@ CC=$(TCPREFIX)gcc LD=$(TCPREFIX)ld INCLUDE=-Iinclude -CFLAGS=-mcpu=5474 -mbitfield -Wall -Wno-multichar -Os -fomit-frame-pointer +CFLAGS=-mcpu=5474 -Wall -Wno-multichar -Os -fomit-frame-pointer SRCDIR=sources OBJDIR=objs @@ -35,6 +35,7 @@ EXEC=bas.s19 CSRCS= \ $(SRCDIR)/startcf.c \ $(SRCDIR)/sysinit.c \ + $(SRCDIR)/init_fpga.c \ $(SRCDIR)/BaS.c \ $(SRCDIR)/cache.c \ $(SRCDIR)/sd_card.c \ @@ -52,17 +53,20 @@ AOBJS=$(patsubst $(SRCDIR)/%.o,$(OBJDIR)/%.o,$(patsubst %.S,%.o,$(ASRCS))) OBJS=$(COBJS) $(AOBJS) -all: $(EXEC) +.PHONY all: $(EXEC) -$(EXEC): $(OBJS) - $(LD) --oformat srec -Map $(MAPFILE) --cref -T flash.lk -s -o $@ - -clean: +.PHONY clean: @ rm -f $(EXEC) $(OBJS) $(MAPFILE) depend +$(EXEC): $(OBJS) $(LDCFILE) + $(LD) --oformat srec -Map $(MAPFILE) --cref -T flash.lk -s -o $@ + +# compile init_fpga with -mbitfield for testing purposes +$(OBJDIR)/init_fpga.o: CFLAGS += -mbitfield + $(OBJDIR)/%.o:$(SRCDIR)/%.c $(CC) -c $(CFLAGS) $(INCLUDE) $< -o $@ - + $(OBJDIR)/%.o:$(SRCDIR)/%.S $(CC) -c $(CFLAGS) -Wa,--bitwise-or $(INCLUDE) $< -o $@