From 3e30b001296fb059cb070498bbe5d8e8834cd3e3 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 25 Sep 2013 14:03:49 +0200 Subject: [PATCH] minidol/Makefile: add wrapper support Every DOL process needs a wrapper file to contain the per-process data structures. This file is named Process_Name_Wrapper.c and is now built/linked automatically. Furthermore, the Makefile does not delete intermediates anymore. --- minidol/Makefile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/minidol/Makefile b/minidol/Makefile index 698da9f..8fe07a3 100644 --- a/minidol/Makefile +++ b/minidol/Makefile @@ -14,11 +14,12 @@ ELIB := lib # Host application and host objects HOSTAPP = $(DEST)/ep_application -HOBJS = $(HDEST)/buffers.o +HOBJS = $(HDEST)/main.o # Epiphany applications and common objects -EPAPPS = $(DEST)/Data_Generator.srec $(DEST)/Weight_Generator.srec -ECOMMON = $(EDEST)/dol.o +EPAPPS = $(DEST)/Beam_Former.srec +EWRAPPERS = $(patsubst $(DEST)%,$(EDEST)%,$(EPAPPS:.srec=_Wrapper.o)) +ECOMMON = $(EDEST)/dol.o $(EDEST)/buffers.o # Epiphany build flags CC = e-gcc @@ -33,12 +34,13 @@ HCFLAGS = -I$(EPIPHANY_HOME)/tools/host/include -std=c99 -Wall HLFLAGS = -L$(EPIPHANY_HOME)/tools/host/lib -le-hal # Global rules +.SECONDARY: .PHONY: all run host cores clean all: run host: $(HOSTAPP) -cores: $(EPAPPS) +cores: $(ECOMMON) $(EWRAPPERS) $(EPAPPS) run: host cores @echo -e "\tRUN" @@ -64,7 +66,7 @@ $(DEST)/%.srec: $(EDEST)/%.elf @echo -e "\t(EPIPHANY) OBJCOPY $@" @$(OBJCOPY) $(OCFLAGS) --output-target srec --srec-forceS3 $^ $@ -$(EDEST)/%.elf: $(ECOMMON) $(EDEST)/%.o +$(EDEST)/%.elf: $(EDEST)/%.o $(EDEST)/%_Wrapper.o $(ECOMMON) @echo -e "\t(EPIPHANY) LINK\t$@" @$(CC) -o $@ $^ $(LFLAGS) -- 2.30.2