1 # This makefile tries to build all RPP projects by calling various
2 # Eclipse commands from command line.
4 # See http://processors.wiki.ti.com/index.php/Projects_-_Command_Line_Build/Create
5 # and https://bugs.eclipse.org/bugs/show_bug.cgi?id=186847
7 ECLIPSE=/opt/ti/ccsv5/eclipse/eclipse
9 WORKSPACE:=$(shell mktemp --dry-run --tmpdir -d rpp-test-sw-workspace.XXXXXXXXXX)
14 rpp-test-sw: $(WORKSPACE)
15 $(ECLIPSE) -noSplash -data $(WORKSPACE) -application com.ti.ccstudio.apps.projectImport -ccs.location $(CURDIR)/rpp-test-sw
16 $(ECLIPSE) -noSplash -data $(WORKSPACE) -application com.ti.ccstudio.apps.projectImport -ccs.location $(CURDIR)/rpp-lib
17 $(ECLIPSE) -noSplash -data $(WORKSPACE) -application com.ti.ccstudio.apps.projectBuild -ccs.projects rpp-test-sw
18 # Previous commands do not always return non-zero exit code on build failure - invoke make directly to not miss a potential error
19 $(MAKE) -C $(CURDIR)/rpp-test-sw/Debug all
22 rm -rf $(wildcard $(dir $(WORKSPACE))rpp-test-sw-workspace.*)
27 # Usage: $(call build_ccs,project directory) or
28 # $(call build_ccs,,project name) for project in current directory
30 all: $(or $2,$(notdir $1))
31 $(or $2,$(notdir $1)): $(WORKSPACE)
32 $(ECLIPSE) -noSplash -data $(WORKSPACE) -application com.ti.ccstudio.apps.projectImport -ccs.location $(if $1,$(CURDIR)/$1,$(CURDIR))
33 $(ECLIPSE) -noSplash -data $(WORKSPACE) -application com.ti.ccstudio.apps.projectBuild -ccs.projects $(or $2,$(notdir $1))
34 # Previous commands do not always return non-zero exit code on build failure - invoke make directly to not miss a potential error
35 $(MAKE) -C $(CURDIR)/$1/Debug all
38 ccs-help: $(WORKSPACE)
39 $(ECLIPSE) -noSplash -data $(WORKSPACE) -application com.ti.ccstudio.apps.projectBuild -ccs.help