diff --git a/src/database/makefile b/src/database/makefile
--- /dev/null
+++ b/src/database/makefile
@@ -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)