From fcc720beb3b284c2b011713decae5e024c9d2b9e Mon Sep 17 00:00:00 2001 From: Federico Santandrea <67011878+sntfrc@users.noreply.github.com> Date: Tue, 16 Jun 2020 18:26:05 +0200 Subject: [PATCH] Initial commit of source code. --- Makefile | 23 ++++++++++++++++ sendalo.html.tpl | 69 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 Makefile create mode 100644 sendalo.html.tpl diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..5cb3f28 --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +all: obj/c2t-96h.so link + +c2t: + @if [ -z "${C2TDIR}" ]; then echo "Please set C2TDIR environment variable to the path of c2t source tree."; exit 1; fi + cd ${C2TDIR}; make + touch c2t + +clean: + rm -f c2t + rm -rf bin/ + rm -rf obj/ + +obj/c2t-96h.so: c2t + mkdir -p obj + emcc -c -Wall -Wno-strict-aliasing -Wno-misleading-indentation -Wno-unused-value -Wno-unused-function -I${C2TDIR} -O3 -o obj/c2t-96h.so ${C2TDIR}/c2t-96h.c -lm + +link: + mkdir -p bin + emcc --shell-file sendalo.html.tpl -s INVOKE_RUN=0 -s EXIT_RUNTIME=0 -s ALLOW_MEMORY_GROWTH=1 -s EXTRA_EXPORTED_RUNTIME_METHODS=['callMain'] -o bin/sendalo.html obj/c2t-96h.so + +test: + cd bin; python3 -m http.server 65020 + diff --git a/sendalo.html.tpl b/sendalo.html.tpl new file mode 100644 index 0000000..4aa4588 --- /dev/null +++ b/sendalo.html.tpl @@ -0,0 +1,69 @@ + + + + + Sendalo + + + + + + + + + + + + + + {{{ SCRIPT }}} + +