X-Git-Url: https://git.ti.com/gitweb?p=tidl%2Ftidl-api.git;a=blobdiff_plain;f=makefile;h=e94e5869ce12a1360de5c214039be59570b69ffd;hp=341d4444ff72fa3e6933601043bbf243fa66cb4c;hb=f718a913c15ace3e2913855d3628396c2e4166de;hpb=2a68a9f3335391e1baa3f539ea9cab64d1da8b89 diff --git a/makefile b/makefile index 341d444..e94e586 100644 --- a/makefile +++ b/makefile @@ -26,17 +26,29 @@ # THE POSSIBILITY OF SUCH DAMAGE. -# makefile for building from the tidl-api git repi -# Required TARGET_ROOTDIR to be set. +# makefile for building from the tidl-api git repo +# Cross-compilation requires TARGET_ROOTDIR to be set. +# E.g. +# PSDK_LINUX= +# 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 @@ -56,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