]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lib.git/blobdiff - Makefile.ccs
Add target specific pinmux for TMS570_HYDCTR
[pes-rpp/rpp-lib.git] / Makefile.ccs
index 14136284a58a9ded153adc1974edf7892279463b..4495661a04e43f86fb436372a19774befdc012e2 100644 (file)
@@ -1,43 +1,32 @@
-# This makefile tries to build the RPP library by invoking Code
-# Composer Studio from command line.
+# Copyright (C) 2013-2015 Czech Technical University in Prague
 #
-# See http://processors.wiki.ti.com/index.php/Projects_-_Command_Line_Build/Create
-# and https://bugs.eclipse.org/bugs/show_bug.cgi?id=186847
-
-
-ECLIPSE=$(foreach file,\
-                  /opt/ti/ccsv5/eclipse/eclipse \
-                  C:/ti/ccsv5/eclipse/eclipsec.exe,\
-            $(if $(wildcard $(file)),$(file)))
-
-ifeq ($(OS),Windows_NT)
-WORKSPACE=$(TEMP)/_workspace
-else
-WORKSPACE:=$(shell mktemp --dry-run --tmpdir -d rpp-test-sw-workspace.XXXXXXXXXX)
-endif
+# Authors:
+#     - Michal Sojka <sojkam1@fel.cvut.cz>
+#
+# This document contains proprietary information belonging to Czech
+# Technical University in Prague. Passing on and copying of this
+# document, and communication of its contents is not permitted
+# without prior written authorization.
+#
+# File : Makefile.ccs
+# Abstract:
+#       This makefile tries to build the RPP library by invoking Code
+#       Composer Studio from command line.
+# Refs:
+#       See http://processors.wiki.ti.com/index.php/Projects_-_Command_Line_Build/Create
+#       and https://bugs.eclipse.org/bugs/show_bug.cgi?id=186847
 
+all: lib
 
-ifeq ($(OS),Windows_NT)
-pathconv=$(subst /,\,$1)
-mkdir=-mkdir $(subst /,\,$1)
-rm=-del /Q $(call pathconv,$1)
-rmdir=-rmdir /S /Q $(call pathconv,$1)
-cp=copy $(subst /,\,$1) $(subst /,\,$2)
-else
-pathconv=$1
-mkdir=mkdir -p $1
-rm=rm -rf $1
-rmdir=-rm -rf $(call pathconv,$1)
-cp=cp $1 $2
-endif
+include common.mk
 
-all: lib
+CCS_PROJECT = $(CURDIR)/build/tms570_hydctr
 
 lib:
-       $(call rmdir,$(WORKSPACE))
-       $(call mkdir,$(WORKSPACE))
-       $(ECLIPSE) -noSplash -data $(WORKSPACE) -application com.ti.ccstudio.apps.projectImport -ccs.location $(CURDIR)
-       $(ECLIPSE) -noSplash -data $(WORKSPACE) -application com.ti.ccstudio.apps.projectBuild -ccs.projects rpp-lib
+       $(call rmdir,$(TMP_WORKSPACE))
+       $(call mkdir,$(TMP_WORKSPACE))
+       $(ECLIPSE) -noSplash -data $(TMP_WORKSPACE) -application com.ti.ccstudio.apps.projectImport -ccs.location $(CCS_PROJECT)
+       $(ECLIPSE) -noSplash -data $(TMP_WORKSPACE) -application com.ti.ccstudio.apps.projectBuild -ccs.projects rpp-lib
 # Previous commands do not always return non-zero exit code on build failure - invoke make directly to not miss a potential error
-       $(MAKE) -f Makefile lib
-       $(call rmdir,$(WORKSPACE))
+       $(MAKE) -C $(CCS_PROJECT)/Debug
+       $(call rmdir,$(TMP_WORKSPACE))