diff --git a/compile_all.py b/compile_all.py index b3fc3c9..8c4d0ad 100755 --- a/compile_all.py +++ b/compile_all.py @@ -64,6 +64,12 @@ def build(algo_dir, template_dir, build_dir): p.wait() assert p.returncode == 0 + if os.path.isfile('./cleanup'): + p = subprocess.Popen(["./cleanup"]) + p.wait() + assert p.returncode == 0 + + finally: sys.stdout.flush() sys.stderr.flush() diff --git a/templates/f7/Makefile b/templates/f7/Makefile index 8d23dd3..0b0cbcb 100644 --- a/templates/f7/Makefile +++ b/templates/f7/Makefile @@ -20,9 +20,9 @@ TARGET = f7 # building variables ###################################### # debug build? -DEBUG = 1 +DEBUG = 0 # optimization -OPT = -Og +OPT = -O2 ####################################### diff --git a/templates/f7/cleanup b/templates/f7/cleanup new file mode 100755 index 0000000..a83f262 --- /dev/null +++ b/templates/f7/cleanup @@ -0,0 +1,5 @@ +#!/bin/bash +rm -rf ./Drivers/ +rm build/*.o +rm build/*.d +rm build/*.lst diff --git a/templates/f7/configure b/templates/f7/configure index 063dc69..cfde59c 100755 --- a/templates/f7/configure +++ b/templates/f7/configure @@ -1,4 +1,6 @@ #!/bin/bash mv -n *.inc *.h Inc/ sed -i src/encrypt.c -e "s/\(\s\)init(/\1_init(/g" +mkdir -p /tmp/f7/Drivers +ln -s /tmp/f7/Drivers Drivers exit 0