@@ -107,9 +107,6 @@ endef
107
107
# can invoke to create the standalone project.
108
108
define generate_arduino_project
109
109
110
- ARDUINO_SRCS := $(patsubst tensorflow /lite /experimental /micro /tools /make /downloads /%, third_party /%, $(patsubst %. cc , %. cpp , $(3 )))
111
- ARDUINO_HDRS := $(patsubst tensorflow /lite /experimental /micro /tools /make /downloads /, third_party /, $(4 ))
112
-
113
110
$(PRJDIR )$(2 )/arduino /src /%. cpp : %. cc
114
111
@mkdir -p $$(dir $$@)
115
112
python tensorflow /lite /experimental /micro /tools /make /transform_arduino_source . py \
@@ -140,7 +137,7 @@ $(PRJDIR)$(2)/arduino/src/third_party/kissfft/kiss_fft.h: tensorflow/lite/experi
140
137
$(PRJDIR )$(2 )/arduino /%: tensorflow /lite /experimental /micro /tools /make /templates /%
141
138
@mkdir -p $$(dir $$@)
142
139
sed -E 's#\%\{SRCS\}\%#$(3)#g' $$< | \
143
- sed -E 's#\%\{EXECUTABLE\}\%#$(1 )#g' | \
140
+ sed -E 's#\%\{EXECUTABLE\}\%#$(2 )#g' | \
144
141
sed -E 's#\%\{LINKER_FLAGS\}\%#$(5)#g' | \
145
142
sed -E 's#\%\{CXX_FLAGS\}\%#$(6)#g' | \
146
143
sed -E 's#\%\{CC_FLAGS\}\%#$(7)#g' > $$@
@@ -153,7 +150,15 @@ $(PRJDIR)$(2)/arduino/src/TensorFlowLite.h: tensorflow/lite/experimental/micro/t
153
150
@mkdir -p $$(dir $$@)
154
151
cp $$< $$@
155
152
156
- generate_ $(2 )_arduino_project : $(addprefix $(PRJDIR )$(2 )/arduino /src /, $(ARDUINO_SRCS ) $(ARDUINO_HDRS )) $(addprefix $(PRJDIR )$(2 )/arduino /, $(1 )) $(PRJDIR )$(2 )/arduino /examples /$(2 )/$(2 ). ino $(PRJDIR )$(2 )/arduino /src /TensorFlowLite . h
153
+ # This would be cleaner if we broke up the list of dependencies into variables,
154
+ # but these get hard to define with the evaluation approach used to define make
155
+ # functions.
156
+ generate_ $(2 )_arduino_project : $(addprefix $(PRJDIR )$(2 )/arduino /src /, \
157
+ $(patsubst tensorflow /lite /experimental /micro /tools /make /downloads /%, third_party /%, $(patsubst %. cc , %. cpp , $(3 ))) \
158
+ $(patsubst tensorflow /lite /experimental /micro /tools /make /downloads /, third_party /, $(4 ))) \
159
+ $(addprefix $(PRJDIR )$(2 )/arduino /, $(1 )) \
160
+ $(PRJDIR )$(2 )/arduino /examples /$(2 )/$(2 ). ino \
161
+ $(PRJDIR )$(2 )/arduino /src /TensorFlowLite . h
157
162
158
163
generate_ $(2 )_arduino_library_zip : generate_ $(2 )_arduino_project
159
164
cd $(PRJDIR )$(2 ) && cp -r arduino $(2 ) && zip -r $(2 ). zip $(2 )
0 commit comments