forked from cpetig/tflite_micro_compiler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (26 loc) · 1018 Bytes
/
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
32
33
34
35
36
37
38
39
40
41
42
TF_DIR=../tensorflow
include common.mk
.PHONY: tflite all
all: compiler$(EXE_SUFFIX) examples
$(TF_MICROLITE_LIB): tflite
tflite:
$(MAKE) -C $(TF_DIR) -f tensorflow/lite/micro/tools/make/Makefile microlite
COMPILER_OBJS = src/main.o src/Compiler.o src/CodeWriter.o src/TypeToString.o src/RecordAllocations.o src/MemMap.o src/CustomOperators.o src/BuiltinAllocations.o
compiler$(EXE_SUFFIX): $(COMPILER_OBJS) $(TF_MICROLITE_LIB)
$(CXX) $(CXXFLAGS) $(LDOPTS) -o $@ $(COMPILER_OBJS) $(LIBS)
clean: clean-compiler clean-examples
$(MAKE) -C $(TF_DIR) -f tensorflow/lite/micro/tools/make/Makefile clean
FORMAT_FILES := $(shell find src -regex '.*\(h\|cpp\)')
format:
clang-format -i $(FORMAT_FILES)
.PHONY: examples clean-examples clean-compiler
examples: tflite
$(MAKE) -C examples all
run_examples: tflite
$(MAKE) -C examples run_all
regenerate: compiler$(EXE_SUFFIX)
$(MAKE) -C examples regenerate
clean-examples:
$(MAKE) -C examples clean
clean-compiler:
$(RM) src/*.o compiler$(EXE_SUFFIX)