forked from cpetig/tflite_micro_compiler
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
31 lines (23 loc) · 1.06 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
TF_DIR=../tensorflow
CXXFLAGS=-g -std=c++14 -DTF_LITE_STATIC_MEMORY -DNDEBUG -O3 -DTF_LITE_DISABLE_X86_NEON -DSUFFICIENT_ARENA_SIZE=128\*1024\*1024 \
-I${TF_DIR} -I${TF_DIR}/tensorflow/lite/micro/tools/make/downloads/ \
-I${TF_DIR}/tensorflow/lite/micro/tools/make/downloads/gemmlowp \
-I${TF_DIR}/tensorflow/lite/micro/tools/make/downloads/flatbuffers/include \
-I${TF_DIR}/tensorflow/lite/micro/tools/make/downloads/ruy \
-I${TF_DIR}/tensorflow/lite/micro/tools/make/downloads/kissfft
LIBS=-L${TF_DIR}/tensorflow/lite/micro/tools/make/gen/linux_x86_64/lib/ \
-ltensorflow-microlite -ldl
all: compiler examples
compiler: src/main.o src/Compiler.o src/CodeWriter.o src/TypeToString.o src/RecordAllocations.o src/MemMap.o src/CustomOperators.o
$(CXX) -o $@ $^ ${LIBS}
clean: clean-compiler clean-examples
FORMAT_FILES := $(shell find src -regex '.*\(h\|cpp\)')
format:
clang-format -i $(FORMAT_FILES)
.PHONY: examples clean-examples clean-compiler
examples:
cd examples && $(MAKE)
clean-examples:
$(MAKE) -C examples clean
clean-compiler:
$(RM) src/*.o compiler