1. Rename the top level /usr/share/ti/exmaples/timl/makefile to Makefile
authorChenchi Luo <a0282871@ti.com>
Wed, 1 Apr 2015 19:02:25 +0000 (14:02 -0500)
committerChenchi Luo <a0282871@ti.com>
Wed, 1 Apr 2015 19:02:25 +0000 (14:02 -0500)
2. added an empty .testignore file inside the /examples/timl/app and /database directories.

makefile
src/app/.testignore [new file with mode: 0644]
src/database/.testignore [new file with mode: 0644]
src/database/makefile [new file with mode: 0644]

index e610da392cda20f0f3da3ed3d685b74d0a099644..25d140b873e217375e16a85e15e06df424f888ac 100644 (file)
--- a/makefile
+++ b/makefile
@@ -48,14 +48,14 @@ install:
        install -m 755 -d ${DESTDIR}/usr/src/timl
        install -m 755 -d ${DESTDIR}/usr/src/timl/build
        cd ./build; make install DESTDIR=${DESTDIR}; cd -;
-       cp ./build/build_app ${DESTDIR}/usr/share/ti/examples/timl/makefile
+       cp ./build/build_app ${DESTDIR}/usr/share/ti/examples/timl/Makefile
        cp -r ./src/app ${DESTDIR}/usr/share/ti/examples/timl/app
        cp -r ./src/database ${DESTDIR}/usr/share/ti/examples/timl/database
        cp -r ./doc ${DESTDIR}/usr/src/timl
        cp -r ./doc/timl.pdf ${DESTDIR}/usr/share/doc/timl
        cp -r ./bin ${DESTDIR}/usr/src/timl
        cp -r ./src ${DESTDIR}/usr/src/timl
-       cp ./build/makefile ${DESTDIR}/usr/src/timl/build
+       cp ./build/makefile ${DESTDIR}/usr/src/timl/build/Makefile
        cp ./build/build_version.txt ${DESTDIR}/usr/src/timl/build
  
 ipk:
@@ -66,14 +66,14 @@ ipk:
        install -m 755 -d ${DESTDIR}/usr/src/timl
        install -m 755 -d ${DESTDIR}/usr/src/timl/build
        cd ./build; make install DESTDIR=${DESTDIR}; cd -;
-       cp ./build/build_app ${DESTDIR}/usr/share/ti/examples/timl/makefile
+       cp ./build/build_app ${DESTDIR}/usr/share/ti/examples/timl/Makefile
        cp -r ./src/app ${DESTDIR}/usr/share/ti/examples/timl/app
        cp -r ./src/database ${DESTDIR}/usr/share/ti/examples/timl/database
        cp -r ./doc ${DESTDIR}/usr/src/timl
        cp -r ./doc/timl.pdf ${DESTDIR}/usr/share/doc/timl
        cp -r ./bin ${DESTDIR}/usr/src/timl
        cp -r ./src ${DESTDIR}/usr/src/timl
-       cp ./build/makefile ${DESTDIR}/usr/src/timl/build
+       cp ./build/makefile ${DESTDIR}/usr/src/timl/build/Makefile
        cp ./build/build_version.txt ${DESTDIR}/usr/src/timl/build
 
 clean:
diff --git a/src/app/.testignore b/src/app/.testignore
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/database/.testignore b/src/database/.testignore
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/database/makefile b/src/database/makefile
new file mode 100644 (file)
index 0000000..38e2da5
--- /dev/null
@@ -0,0 +1,162 @@
+################################################################################
+#
+# makefile
+#
+# Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
+#
+# 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.
+#
+################################################################################
+
+C_INCLUDE_PATH = ../common/api ../common/cnn ../common/util \
+/usr/include
+C_INCLUDE_PATH_FLAG = $(foreach d, $(C_INCLUDE_PATH), -I$d)
+C_LIB = timl blas jpeg m 
+C_LIB_FLAG = $(foreach d, $(C_LIB), -l$d)
+C_LIB_PATH = /usr/lib ../../bin
+C_LIB_PATH_FLAG = $(foreach d, $(C_LIB_PATH), -L$d)
+CC = gcc
+CFLAGS += -g -O3 -fopenmp
+
+CPPC = g++
+
+
+AR = @ar
+ARFLAGS = -rcs
+RM = @rm
+RMFLAGS += -fr
+
+
+# APP CNN CLASS
+APP_CNN_CLASS_BIN_CFILES = $(shell find ./cnn/class -name "*.c")
+APP_CNN_CLASS_BIN_OBJS =  $(patsubst %.c, %.o, $(APP_CNN_CLASS_BIN_CFILES))
+APP_CNN_CLASS_BINS =  $(patsubst %.c, %.bin, $(APP_CNN_CLASS_BIN_CFILES))
+APP_CNN_CLASS_HFILES = $(shell find ./cnn/class -name "*.h")
+
+# APP CNN SL
+APP_CNN_SL_BIN_HFILES = $(shell find ./cnn/scene -name "*.h")
+APP_CNN_SL_BIN_CFILES = $(shell find ./cnn/scene/sbd -name "*.c")
+APP_CNN_SL_BIN_OBJS =  $(patsubst %.c, %.o, $(APP_CNN_SL_BIN_CFILES))
+APP_CNN_SL_BINS =  $(patsubst %.c, %.bin, $(APP_CNN_SL_BIN_CFILES))
+APP_CNN_SL_CFILES = $(shell find ./cnn/scene -name "*.c")
+APP_CNN_SL_OBJS = $(patsubst %.c, %.o, $(APP_CNN_SL_CFILES))
+APP_CNN_SL_AUX_OBJS = $(filter-out $(APP_CNN_SL_BIN_OBJS), $(APP_CNN_SL_OBJS))
+
+# APP CNN INTEROP CAFFE
+APP_CNN_INTEROP_CAFFE_BIN_CFILES = $(shell find ./cnn/interop/caffe -name "*.cpp")
+APP_CNN_INTEROP_CAFFE_BIN_OBJS =  $(patsubst %.cpp, %.o, $(APP_CNN_INTEROP_CAFFE_BIN_CFILES))
+APP_CNN_INTEROP_CAFFE_BINS = ./cnn/interop/caffe/appCNNInteropCaffe.bin
+APP_CNN_INTEROP_CAFFE_HFILES = $(shell find ./cnn/interop/caffe -name "*.hpp")
+
+# APP CNN CONVERT IMAGENET
+APP_CNN_CONVERT_IMAGENET_BIN_CFILES = $(shell find ./cnn/convert/imagenet -name "*.cpp")
+APP_CNN_CONVERT_IMAGENET_BIN_OBJS =  $(patsubst %.cpp, %.o, $(APP_CNN_CONVERT_IMAGENET_BIN_CFILES))
+APP_CNN_CONVERT_IMAGENET_BINS = ./cnn/convert/imagenet/appCNNConvertImageNet.bin
+APP_CNN_CONVERT_IMAGENET_HFILES = $(shell find ./cnn/convert/imagenet -name "*.hpp")
+
+# APP CNN CONVERT SBD
+APP_CNN_CONVERT_SBD_BIN_CFILES = $(shell find ./cnn/convert/sbd -name "*.cpp")
+APP_CNN_CONVERT_SBD_BIN_OBJS =  $(patsubst %.cpp, %.o, $(APP_CNN_CONVERT_SBD_BIN_CFILES))
+APP_CNN_CONVERT_SBD_BINS = ./cnn/convert/sbd/appCNNConvertSBD.bin
+APP_CNN_CONVERT_SBD_HFILES = $(shell find ./cnn/convert/sbd -name "*.hpp")
+
+
+APP_CNN_BINS = \
+$(APP_CNN_CLASS_BINS) \
+$(APP_CNN_SL_BINS) \
+$(APP_CNN_CONVERT_IMAGENET_BINS) \
+$(APP_CNN_CONVERT_SBD_BINS) \
+$(APP_CNN_INTEROP_CAFFE_BINS)
+
+APP_CNN_OBJS = \
+$(APP_CNN_CLASS_BIN_OBJS) \
+$(APP_CNN_SL_OBJS) \
+$(APP_CNN_INTEROP_CAFFE_BIN_OBJS) \
+$(APP_CNN_CONVERT_IMAGENET_BIN_OBJS) \
+$(APP_CNN_CONVERT_SBD_BIN_OBJS)
+
+all: $(APP_CNN_BINS)
+
+clean:
+       $(RM) $(RMFLAGS) \
+       $(APP_CNN_OBJS) \
+       $(APP_CNN_BINS)
+
+# appCNNClass bins
+$(APP_CNN_CLASS_BINS): %.bin: %.o
+       $(CC) $(CFLAGS) -o $@ $^ \
+       $(C_LIB_FLAG) $(C_LIB_PATH_FLAG)
+       
+# appCNNClass objs
+$(APP_CNN_CLASS_BIN_OBJS): %.o: %.c $(APP_CNN_CLASS_HFILES)
+       $(CC) -c $(CFLAGS) -o $@ $< \
+       $(C_INCLUDE_PATH_FLAG)
+       
+# appCNNScene bins
+$(APP_CNN_SL_BINS): %.bin: %.o $(APP_CNN_SL_AUX_OBJS)
+       $(CC) $(CFLAGS) -o $@ $^ \
+       $(C_LIB_FLAG) $(C_LIB_PATH_FLAG)
+
+# appCNNScene objs
+$(APP_CNN_SL_OBJS): %.o: %.c $(APP_CNN_SL_HFILES)
+       $(CC) -c $(CFLAGS) -o $@ $< \
+       $(C_INCLUDE_PATH_FLAG)
+
+# appCNNConvertImageNet bins 
+$(APP_CNN_CONVERT_IMAGENET_BINS): $(APP_CNN_CONVERT_IMAGENET_BIN_OBJS)
+       $(CPPC) $(CFLAGS) -o $(APP_CNN_CONVERT_IMAGENET_BINS) $^ \
+       -lopencv_core -lopencv_highgui -lopencv_imgproc \
+       $(C_LIB_PATH_FLAG)
+       
+# appCNNConvertImageNet objs
+$(APP_CNN_CONVERT_IMAGENET_BIN_OBJS): %.o: %.cpp $(APP_CNN_CONVERT_IMAGENET_HFILES)
+       $(CPPC) -c $(CFLAGS) -o $@ $< \
+       $(C_INCLUDE_PATH_FLAG)
+
+# appCNNConvertSBD bins 
+$(APP_CNN_CONVERT_SBD_BINS): $(APP_CNN_CONVERT_SBD_BIN_OBJS)
+       $(CPPC) $(CPPFLAGS) -o $(APP_CNN_CONVERT_SBD_BINS) $^ \
+       -lopencv_core -lopencv_highgui -lopencv_imgproc \
+       $(C_LIB_PATH_FLAG)
+       
+# appCNNConvertSBD objs
+$(APP_CNN_CONVERT_SBD_BIN_OBJS): %.o: %.cpp $(APP_CNN_CONVERT_SBD_HFILES)
+       $(CPPC) -c $(CFLAGS) -o $@ $< \
+       $(C_INCLUDE_PATH_FLAG)
+
+# appCNNInteropCaffe bins
+$(APP_CNN_INTEROP_CAFFE_BINS): $(APP_CNN_INTEROP_CAFFE_BIN_OBJS)
+       $(CPPC) $(CFLAGS) -o $(APP_CNN_INTEROP_CAFFE_BINS) $^ \
+       -lprotobuf \
+       $(C_LIB_FLAG) $(C_LIB_PATH_FLAG)
+
+# appCNNInteropCaffe objs
+$(APP_CNN_INTEROP_CAFFE_BIN_OBJS): %.o: %.cpp $(APP_CNN_INTEROP_CAFFE_HFILES)
+       $(CPPC) -c $(CFLAGS) -o $@ $< \
+       $(C_INCLUDE_PATH_FLAG)