]> rtime.felk.cvut.cz Git - pes-rpp/rpp-test-sw.git/commitdiff
Makefile: Allow building and releasing for multiple targets
authorMichal Sojka <sojkam1@fel.cvut.cz>
Sat, 4 Jul 2015 12:43:44 +0000 (14:43 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Sat, 4 Jul 2015 12:43:44 +0000 (14:43 +0200)
Makefile

index c48c42582af96b54c1c78be47801e5c5c9d07f7c..2761ab96ef0350602651b04d19e3f5893d7f58e4 100644 (file)
--- 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 \