summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChenchi Luo2015-04-01 14:02:25 -0500
committerChenchi Luo2015-04-01 14:02:25 -0500
commitbd26df495d616526e952db11020b89c193f3e851 (patch)
tree743da77aaddd7f51677ad70e094f564f99b442a0 /src
parentbb7fc10681aae537c234ace57a9038ee364278d5 (diff)
downloadti-machine-learning-bd26df495d616526e952db11020b89c193f3e851.tar.gz
ti-machine-learning-bd26df495d616526e952db11020b89c193f3e851.tar.xz
ti-machine-learning-bd26df495d616526e952db11020b89c193f3e851.zip
1. Rename the top level /usr/share/ti/exmaples/timl/makefile to Makefile
2. added an empty .testignore file inside the /examples/timl/app and /database directories.
Diffstat (limited to 'src')
-rw-r--r--src/app/.testignore0
-rw-r--r--src/database/.testignore0
-rw-r--r--src/database/makefile162
3 files changed, 162 insertions, 0 deletions
diff --git a/src/app/.testignore b/src/app/.testignore
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/app/.testignore
diff --git a/src/database/.testignore b/src/database/.testignore
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/database/.testignore
diff --git a/src/database/makefile b/src/database/makefile
new file mode 100644
index 0000000..38e2da5
--- /dev/null
+++ b/src/database/makefile
@@ -0,0 +1,162 @@
1################################################################################
2#
3# makefile
4#
5# Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
6#
7# Redistribution and use in source and binary forms, with or without
8# modification, are permitted provided that the following conditions
9# are met:
10#
11# Redistributions of source code must retain the above copyright
12# notice, this list of conditions and the following disclaimer.
13#
14# Redistributions in binary form must reproduce the above copyright
15# notice, this list of conditions and the following disclaimer in the
16# documentation and/or other materials provided with the
17# distribution.
18#
19# Neither the name of Texas Instruments Incorporated nor the names of
20# its contributors may be used to endorse or promote products derived
21# from this software without specific prior written permission.
22#
23# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34#
35################################################################################
36
37C_INCLUDE_PATH = ../common/api ../common/cnn ../common/util \
38/usr/include
39C_INCLUDE_PATH_FLAG = $(foreach d, $(C_INCLUDE_PATH), -I$d)
40C_LIB = timl blas jpeg m
41C_LIB_FLAG = $(foreach d, $(C_LIB), -l$d)
42C_LIB_PATH = /usr/lib ../../bin
43C_LIB_PATH_FLAG = $(foreach d, $(C_LIB_PATH), -L$d)
44CC = gcc
45CFLAGS += -g -O3 -fopenmp
46
47CPPC = g++
48
49
50AR = @ar
51ARFLAGS = -rcs
52RM = @rm
53RMFLAGS += -fr
54
55
56# APP CNN CLASS
57APP_CNN_CLASS_BIN_CFILES = $(shell find ./cnn/class -name "*.c")
58APP_CNN_CLASS_BIN_OBJS = $(patsubst %.c, %.o, $(APP_CNN_CLASS_BIN_CFILES))
59APP_CNN_CLASS_BINS = $(patsubst %.c, %.bin, $(APP_CNN_CLASS_BIN_CFILES))
60APP_CNN_CLASS_HFILES = $(shell find ./cnn/class -name "*.h")
61
62# APP CNN SL
63APP_CNN_SL_BIN_HFILES = $(shell find ./cnn/scene -name "*.h")
64APP_CNN_SL_BIN_CFILES = $(shell find ./cnn/scene/sbd -name "*.c")
65APP_CNN_SL_BIN_OBJS = $(patsubst %.c, %.o, $(APP_CNN_SL_BIN_CFILES))
66APP_CNN_SL_BINS = $(patsubst %.c, %.bin, $(APP_CNN_SL_BIN_CFILES))
67APP_CNN_SL_CFILES = $(shell find ./cnn/scene -name "*.c")
68APP_CNN_SL_OBJS = $(patsubst %.c, %.o, $(APP_CNN_SL_CFILES))
69APP_CNN_SL_AUX_OBJS = $(filter-out $(APP_CNN_SL_BIN_OBJS), $(APP_CNN_SL_OBJS))
70
71# APP CNN INTEROP CAFFE
72APP_CNN_INTEROP_CAFFE_BIN_CFILES = $(shell find ./cnn/interop/caffe -name "*.cpp")
73APP_CNN_INTEROP_CAFFE_BIN_OBJS = $(patsubst %.cpp, %.o, $(APP_CNN_INTEROP_CAFFE_BIN_CFILES))
74APP_CNN_INTEROP_CAFFE_BINS = ./cnn/interop/caffe/appCNNInteropCaffe.bin
75APP_CNN_INTEROP_CAFFE_HFILES = $(shell find ./cnn/interop/caffe -name "*.hpp")
76
77# APP CNN CONVERT IMAGENET
78APP_CNN_CONVERT_IMAGENET_BIN_CFILES = $(shell find ./cnn/convert/imagenet -name "*.cpp")
79APP_CNN_CONVERT_IMAGENET_BIN_OBJS = $(patsubst %.cpp, %.o, $(APP_CNN_CONVERT_IMAGENET_BIN_CFILES))
80APP_CNN_CONVERT_IMAGENET_BINS = ./cnn/convert/imagenet/appCNNConvertImageNet.bin
81APP_CNN_CONVERT_IMAGENET_HFILES = $(shell find ./cnn/convert/imagenet -name "*.hpp")
82
83# APP CNN CONVERT SBD
84APP_CNN_CONVERT_SBD_BIN_CFILES = $(shell find ./cnn/convert/sbd -name "*.cpp")
85APP_CNN_CONVERT_SBD_BIN_OBJS = $(patsubst %.cpp, %.o, $(APP_CNN_CONVERT_SBD_BIN_CFILES))
86APP_CNN_CONVERT_SBD_BINS = ./cnn/convert/sbd/appCNNConvertSBD.bin
87APP_CNN_CONVERT_SBD_HFILES = $(shell find ./cnn/convert/sbd -name "*.hpp")
88
89
90APP_CNN_BINS = \
91$(APP_CNN_CLASS_BINS) \
92$(APP_CNN_SL_BINS) \
93$(APP_CNN_CONVERT_IMAGENET_BINS) \
94$(APP_CNN_CONVERT_SBD_BINS) \
95$(APP_CNN_INTEROP_CAFFE_BINS)
96
97APP_CNN_OBJS = \
98$(APP_CNN_CLASS_BIN_OBJS) \
99$(APP_CNN_SL_OBJS) \
100$(APP_CNN_INTEROP_CAFFE_BIN_OBJS) \
101$(APP_CNN_CONVERT_IMAGENET_BIN_OBJS) \
102$(APP_CNN_CONVERT_SBD_BIN_OBJS)
103
104all: $(APP_CNN_BINS)
105
106clean:
107 $(RM) $(RMFLAGS) \
108 $(APP_CNN_OBJS) \
109 $(APP_CNN_BINS)
110
111# appCNNClass bins
112$(APP_CNN_CLASS_BINS): %.bin: %.o
113 $(CC) $(CFLAGS) -o $@ $^ \
114 $(C_LIB_FLAG) $(C_LIB_PATH_FLAG)
115
116# appCNNClass objs
117$(APP_CNN_CLASS_BIN_OBJS): %.o: %.c $(APP_CNN_CLASS_HFILES)
118 $(CC) -c $(CFLAGS) -o $@ $< \
119 $(C_INCLUDE_PATH_FLAG)
120
121# appCNNScene bins
122$(APP_CNN_SL_BINS): %.bin: %.o $(APP_CNN_SL_AUX_OBJS)
123 $(CC) $(CFLAGS) -o $@ $^ \
124 $(C_LIB_FLAG) $(C_LIB_PATH_FLAG)
125
126# appCNNScene objs
127$(APP_CNN_SL_OBJS): %.o: %.c $(APP_CNN_SL_HFILES)
128 $(CC) -c $(CFLAGS) -o $@ $< \
129 $(C_INCLUDE_PATH_FLAG)
130
131# appCNNConvertImageNet bins
132$(APP_CNN_CONVERT_IMAGENET_BINS): $(APP_CNN_CONVERT_IMAGENET_BIN_OBJS)
133 $(CPPC) $(CFLAGS) -o $(APP_CNN_CONVERT_IMAGENET_BINS) $^ \
134 -lopencv_core -lopencv_highgui -lopencv_imgproc \
135 $(C_LIB_PATH_FLAG)
136
137# appCNNConvertImageNet objs
138$(APP_CNN_CONVERT_IMAGENET_BIN_OBJS): %.o: %.cpp $(APP_CNN_CONVERT_IMAGENET_HFILES)
139 $(CPPC) -c $(CFLAGS) -o $@ $< \
140 $(C_INCLUDE_PATH_FLAG)
141
142# appCNNConvertSBD bins
143$(APP_CNN_CONVERT_SBD_BINS): $(APP_CNN_CONVERT_SBD_BIN_OBJS)
144 $(CPPC) $(CPPFLAGS) -o $(APP_CNN_CONVERT_SBD_BINS) $^ \
145 -lopencv_core -lopencv_highgui -lopencv_imgproc \
146 $(C_LIB_PATH_FLAG)
147
148# appCNNConvertSBD objs
149$(APP_CNN_CONVERT_SBD_BIN_OBJS): %.o: %.cpp $(APP_CNN_CONVERT_SBD_HFILES)
150 $(CPPC) -c $(CFLAGS) -o $@ $< \
151 $(C_INCLUDE_PATH_FLAG)
152
153# appCNNInteropCaffe bins
154$(APP_CNN_INTEROP_CAFFE_BINS): $(APP_CNN_INTEROP_CAFFE_BIN_OBJS)
155 $(CPPC) $(CFLAGS) -o $(APP_CNN_INTEROP_CAFFE_BINS) $^ \
156 -lprotobuf \
157 $(C_LIB_FLAG) $(C_LIB_PATH_FLAG)
158
159# appCNNInteropCaffe objs
160$(APP_CNN_INTEROP_CAFFE_BIN_OBJS): %.o: %.cpp $(APP_CNN_INTEROP_CAFFE_HFILES)
161 $(CPPC) -c $(CFLAGS) -o $@ $< \
162 $(C_INCLUDE_PATH_FLAG)