From f840b5a5d25c36775fe01d96042a55a966acfde2 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Sat, 4 Jul 2015 14:43:44 +0200 Subject: [PATCH] Makefile: Allow building and releasing for multiple targets --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index c48c425..2761ab9 100644 --- a/Makefile +++ b/Makefile @@ -12,9 +12,11 @@ all: rpp-test-sw RELEASE_PREFIX = rpp-test-sw include rpp-lib/common.mk +TARGET ?= $(error TARGET variable not defined) + rpp-test-sw: $(TMP_WORKSPACE) $(ECLIPSE) -noSplash -data $(TMP_WORKSPACE) -application com.ti.ccstudio.apps.projectImport -ccs.location $(CURDIR)/rpp-test-sw - $(ECLIPSE) -noSplash -data $(TMP_WORKSPACE) -application com.ti.ccstudio.apps.projectImport -ccs.location $(CURDIR)/rpp-lib/build/tms570_hdk + $(ECLIPSE) -noSplash -data $(TMP_WORKSPACE) -application com.ti.ccstudio.apps.projectImport -ccs.location $(CURDIR)/rpp-lib/build/$(TARGET) $(ECLIPSE) -noSplash -data $(TMP_WORKSPACE) -application com.ti.ccstudio.apps.projectBuild -ccs.projects rpp-test-sw # Previous commands do not always return non-zero exit code on build failure - invoke make directly to not miss a potential error $(MAKE) -C $(CURDIR)/rpp-test-sw/Debug all @@ -48,8 +50,7 @@ uncrustify: release: $(RELEASE_BASENAME).zip -RELEASE_TARGET ?= tms570_hdk -include rpp-lib/build/$(RELEASE_TARGET)/Makefile.config +RELEASE_TARGET = $(TARGET) RELEASE_LIB_GIT_FILES = \ Makefile.var \ -- 2.39.2