]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - tidl/tidl-api.git/blobdiff - makefile
Optimize examples with EOP double buffering
[tidl/tidl-api.git] / makefile
index 72c0a9f108e5f96000540e40a47758f049531a9e..e94e5869ce12a1360de5c214039be59570b69ffd 100644 (file)
--- a/makefile
+++ b/makefile
 # THE POSSIBILITY OF SUCH DAMAGE.
 
 
-# makefile for TI internal use
+# makefile for building from the tidl-api git repo
+# Cross-compilation requires TARGET_ROOTDIR to be set.
+# E.g.
+# PSDK_LINUX=<path to Processor Linux SDK install>
+# TARGET_ROOTDIR=$PSDK_LINUX/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi
 
 ifneq (,$(findstring 86, $(shell uname -m)))
 DEST_DIR ?= $(CURDIR)/install/am57
+VIEWER_TARGET=x86
+ifeq ($(TARGET_ROOTDIR),)
+$(error Set TARGET_ROOTDIR to the ARM Linux devkit/filesystem)
+endif
+else
+VIEWER_TARGET=arm
 endif
 
 INSTALL_DIR_API = $(DEST_DIR)/usr/share/ti/tidl
 INSTALL_DIR_EXAMPLES = $(DEST_DIR)/usr/share/ti/examples/tidl
 
-CP_ARGS=-Prf --preserve=mode,timestamps --no-preserve=ownership
+CP_ARGS = -Prf
+ifneq (,$(findstring 86, $(shell uname -m)))
+CP_ARGS += --preserve=mode,timestamps --no-preserve=ownership
+endif
 
 build-api:
        $(MAKE) -C tidl_api
@@ -43,6 +56,10 @@ build-api:
 build-examples: install-api
        $(MAKE) -C examples
 
+# Build HTML from Sphinx RST, requires Sphinx to be installed
+build-docs:
+       $(MAKE) -C docs
+
 install-api: build-api
        mkdir -p $(INSTALL_DIR_API)
        cp $(CP_ARGS) tidl_api $(INSTALL_DIR_API)/
@@ -51,5 +68,9 @@ install-examples: build-examples
        mkdir -p $(INSTALL_DIR_EXAMPLES)
        cp $(CP_ARGS) examples/* $(INSTALL_DIR_EXAMPLES)/
 
+build-viewer:
+       $(MAKE) TARGET=$(VIEWER_TARGET) -C viewer
+
 clean:
        $(MAKE) -C tidl_api     clean
+       $(MAKE) -C examples     clean