]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - tidl/tidl-api.git/commitdiff
Update examples Makefile to use /usr/share/ti/tidl
authorAjay Jayaraj <ajayj@ti.com>
Mon, 25 Jun 2018 21:10:25 +0000 (16:10 -0500)
committerAjay Jayaraj <ajayj@ti.com>
Mon, 25 Jun 2018 21:15:30 +0000 (16:15 -0500)
Update Makefile(s) in the examples directory to use tidl-api headers and
libraries from /usr/share/ti/tidl/tidl_api.

(MCT-1005)

examples/Makefile
examples/make.common
makefile [new file with mode: 0644]
readme.md
tidl_api/make.buildid

index 512e2edbb6984fdafb8afbe2bdc4b2bb9cba1933..69c708600066f1dbd22ac98d8b7a7552ddba0dda 100644 (file)
@@ -42,6 +42,3 @@ all:
 .PHONY: clean
 clean:
        $(call make_in_dirs, $(DIRS), clean)
 .PHONY: clean
 clean:
        $(call make_in_dirs, $(DIRS), clean)
-
-realclean: clean
-       make -C ../tidl_api clean
index aca5ece94e7fb79123d837f2efd11708936ed1e0..e0111173572380e0ddc4c2c2ec0419829204ce25 100644 (file)
@@ -28,7 +28,7 @@ RM = rm
 AR = ar
 CP = cp
 
 AR = ar
 CP = cp
 
-TIDL_API_DIR = ../../tidl_api
+TIDL_API_DIR ?= ${TARGET_ROOTDIR}/usr/share/ti/tidl/tidl_api
 TIDL_API_LIB_NAME = tidl_api.a
 TIDL_API_LIB = $(TIDL_API_DIR)/$(TIDL_API_LIB_NAME)
 TIDL_API_LIB_IMGUTIL_NAME = tidl_imgutil.a
 TIDL_API_LIB_NAME = tidl_api.a
 TIDL_API_LIB = $(TIDL_API_DIR)/$(TIDL_API_LIB_NAME)
 TIDL_API_LIB_IMGUTIL_NAME = tidl_imgutil.a
@@ -51,18 +51,6 @@ LIBS    = -lOpenCL -locl_util -lpthread
 
 all: $(EXE)
 
 
 all: $(EXE)
 
-.PHONY: $(TIDL_API_LIB)
-$(TIDL_API_LIB):
-       $(MAKE) -C $(TIDL_API_DIR) $(TIDL_API_LIB_NAME)
-
-.PHONY: $(TIDL_API_LIB_IMGUTIL)
-$(TIDL_API_LIB_IMGUTIL):
-       $(MAKE) -C $(TIDL_API_DIR) $(TIDL_API_LIB_IMGUTIL_NAME)
-
-realclean: clean
-       $(MAKE) -C $(TIDL_API_DIR) clean
-       $(MAKE) -C $(TIDL_API_DIR)/dsp clean
-
 clean::
        $(RM) -f $(EXE) stats_tool_out.* *.out
 
 clean::
        $(RM) -f $(EXE) stats_tool_out.* *.out
 
diff --git a/makefile b/makefile
new file mode 100644 (file)
index 0000000..72c0a9f
--- /dev/null
+++ b/makefile
@@ -0,0 +1,55 @@
+
+# Copyright (c) 2018 Texas Instruments Incorporated - http://www.ti.com/
+# All rights reserved.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of Texas Instruments Incorporated nor the
+# names of its contributors may be used to endorse or promote products
+# derived from this software without specific prior written permission.
+# 
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+# THE POSSIBILITY OF SUCH DAMAGE.
+
+
+# makefile for TI internal use
+
+ifneq (,$(findstring 86, $(shell uname -m)))
+DEST_DIR ?= $(CURDIR)/install/am57
+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
+
+build-api:
+       $(MAKE) -C tidl_api
+
+build-examples: install-api
+       $(MAKE) -C examples
+
+install-api: build-api
+       mkdir -p $(INSTALL_DIR_API)
+       cp $(CP_ARGS) tidl_api $(INSTALL_DIR_API)/
+
+install-examples: build-examples
+       mkdir -p $(INSTALL_DIR_EXAMPLES)
+       cp $(CP_ARGS) examples/* $(INSTALL_DIR_EXAMPLES)/
+
+clean:
+       $(MAKE) -C tidl_api     clean
index 91f447ca65cf73ba1fe93cff4974b898c15e3ab0..092f09b7e4670107c000555617f96af32999a0e4 100644 (file)
--- a/readme.md
+++ b/readme.md
@@ -1,4 +1,4 @@
 TI Deep Learning (TIDL) API
 ---------------------------
 
 TI Deep Learning (TIDL) API
 ---------------------------
 
-TIDL API brings Deep Learning to the edge and enables Linux applications to leverage TI’s proprietary CNN/DNN implementation on Deep Learning Accelerators (DLAs) and C66x DSPs in AM57x SoCs.  It requires OpenCL v1.1.15.1 or newer. Refer the User's Guide for details: http://software-dl.ti.com/mctools/esd/docs/tidl-api/index.html
+TIDL API brings Deep Learning to the edge and enables Linux applications to leverage TI’s proprietary CNN/DNN implementation on EVEs and C66x DSPs in AM57x SoCs.  It requires OpenCL v1.1.15.1 or newer. Refer the User's Guide for details: http://software-dl.ti.com/mctools/esd/docs/tidl-api/index.html
index d5658e948c2681eeafea3a5a7841120a54cdf608..600c3c0212ff8d4930e680c8d52d5f7cea394b7f 100644 (file)
@@ -27,6 +27,7 @@
 MAJOR_VER=1
 MINOR_VER=0
 PATCH_VER=0
 MAJOR_VER=1
 MINOR_VER=0
 PATCH_VER=0
+BUILD_VER=2
 
 ifeq ($(shell git rev-parse --short HEAD 2>&1 1>/dev/null; echo $$?),0)
 BUILD_SHA?=$(shell git rev-parse --short HEAD)
 
 ifeq ($(shell git rev-parse --short HEAD 2>&1 1>/dev/null; echo $$?),0)
 BUILD_SHA?=$(shell git rev-parse --short HEAD)
@@ -34,6 +35,6 @@ endif
 
 .PHONY: $(BUILD_ID)
 BUILD_ID := -D_BUILD_VER=$(shell echo "" | \
 
 .PHONY: $(BUILD_ID)
 BUILD_ID := -D_BUILD_VER=$(shell echo "" | \
-                awk '{ printf ("%02d.%02d.%02d", $(MAJOR_VER), \
-                $(MINOR_VER), $(PATCH_VER)); }') \
+                awk '{ printf ("%02d.%02d.%02d.%02d", $(MAJOR_VER), \
+                $(MINOR_VER), $(PATCH_VER), $(BUILD_VER)); }') \
                        -D_BUILD_SHA=$(BUILD_SHA)
                        -D_BUILD_SHA=$(BUILD_SHA)