<commit_before>all: example host-example

host-example: definitions
	node microflo.js generate examples/host.fbp build/host/example.cpp
	g++ -o build/host/example build/host/example.cpp $(CFLAGS) -I./microflo -DHOST_BUILD

example: definitions
	mkdir -p build/arduino/src
	mkdir -p build/arduino/lib
	ln -sf `pwd`/microflo build/arduino/lib/
	node microflo.js generate examples/echo.fbp build/arduino/src/serial.ino
	cd build/arduino && ino build

upload: example
	cd build/arduino && ino upload

definitions:
	node microflo.js update-defs

clean:
	git clean -dfx --exclude=node_modules

.PHONY: all example host-example definitions clean
<commit_msg>Allow to select which graph to build/upload<commit_after># TODO: build+test all examples, for both target+host

GRAPH=examples/readbutton.fbp

all: build hostbuild

hostbuild: definitions
	node microflo.js generate examples/host.fbp build/host/example.cpp
	g++ -o build/host/example build/host/example.cpp $(CFLAGS) -I./microflo -DHOST_BUILD

build: definitions
	mkdir -p build/arduino/src
	mkdir -p build/arduino/lib
	ln -sf `pwd`/microflo build/arduino/lib/
	node microflo.js generate $(GRAPH) build/arduino/src/serial.ino
	cd build/arduino && ino build

upload: build
	cd build/arduino && ino upload

definitions:
	node microflo.js update-defs

clean:
	git clean -dfx --exclude=node_modules

.PHONY: all build hostbuild definitions clean

{'fraction_non_alphanumeric': 0.10129310344827586, 'fraction_numerical': 0.0, 'mean_word_length': 4.357692307692307, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3029018', 'n_tokens_mistral': 505, 'n_tokens_neox': 481, 'n_words': 133}