-
-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (25 loc) · 804 Bytes
/
Makefile
File metadata and controls
37 lines (25 loc) · 804 Bytes
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
# Location of top-level MicroPython directory
MPY_DIR = ../../micropython
# Architecture to build for (x86, x64, armv6m, armv7m, xtensa, xtensawin)
ARCH = x64
# The ABI version for .mpy files
MPY_ABI_VERSION := 6.3
# Location of emlearn library
EMLEARN_DIR := $(shell python3 -c "import emlearn; print(emlearn.includedir)")
# enable linking of libm etc
LINK_RUNTIME=1
DIST_DIR := ../../dist/$(ARCH)_$(MPY_ABI_VERSION)
# Name of module
MOD = emlearn_extratrees
# Source files (.c or .py)
SRC = extratrees.c
# Include to get the rules for compiling and linking the module
include $(MPY_DIR)/py/dynruntime.mk
# Releases
DIST_FILE = $(DIST_DIR)/$(MOD).mpy
$(DIST_DIR):
mkdir -p $@
$(DIST_FILE): $(MOD).mpy $(DIST_DIR)
cp $< $@
CFLAGS += -I$(EMLEARN_DIR) -Wno-unused-function
dist: $(DIST_FILE)