# See http://processors.wiki.ti.com/index.php/Projects_-_Command_Line_Build/Create
# and https://bugs.eclipse.org/bugs/show_bug.cgi?id=186847
+include rpp-lib/Makefile.var
+
all: rpp-test-sw
$(call rmdir,$(TMP_WORKSPACE))
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
+ $(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.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
release: $(RELEASE_BASENAME).zip
+RELEASE_TARGET ?= tms570_hdk
+include rpp-lib/build/$(RELEASE_TARGET)/Makefile.config
+
$(RELEASE_BASENAME):: lib
+ @echo 'Get version from git'
+ mkdir -p $@/rpp-test-sw/Debug
+ $(MAKE) -C $@/rpp-test-sw/Debug -f $(CURDIR)/rpp-test-sw/Makefile.version version.h
+
+ mkdir -p $@/rpp-lib/build/$(RELEASE_TARGET)/
mkdir -p $@/rpp-lib/rpp/
- mkdir -p $@/rpp-lib/os/7.0.2_tms570
+ mkdir -p $@/rpp-lib/os/$(rpp_lib_OS)
+ifneq ($(filter lwip/src/include,$(rpp_lib_INCLUDES)),)
mkdir -p $@/rpp-lib/lwip/src
+endif
- cp --parents rpp-lib/rpp-lib.lib rpp-lib/common.mk $@/
+ cp --parents rpp-lib/rpp-lib.lib rpp-lib/common.mk rpp-lib/Makefile.config $@/
cp --parents rpp-lib/.ccsproject rpp-lib/.cproject rpp-lib/.project $@/
cp -r rpp-lib/rpp/include $@/rpp-lib/rpp/include
- cp rpp-lib/rpp/TMS570LS313xFlashLnk.cmd $@/rpp-lib/rpp/TMS570LS313xFlashLnk.cmd
- cp -r rpp-lib/os/7.0.2_tms570/include $@/rpp-lib/os/7.0.2_tms570/include
+ cp --parents rpp-lib/build/$(RELEASE_TARGET)/$(TARGET_LDCMD) $@/
+ cp -r rpp-lib/os/$(rpp_lib_OS)/include $@/rpp-lib/os/$(rpp_lib_OS)/include
+ifneq ($(filter lwip/src/include,$(rpp_lib_INCLUDES)),)
cp -r rpp-lib/lwip/src/include $@/rpp-lib/lwip/src/include
-
-
+endif
lib:
- $(MAKE) -C rpp-lib/Release
+ $(MAKE) -C rpp-lib/build/$(RELEASE_TARGET)/Release