Permalink
Browse files

update emcc compile scripts & readme

  • Loading branch information...
postspectacular committed Aug 13, 2016
1 parent 3364c35 commit 49f27018fc0aa63a25122f674c6a8f714df96c95
Showing with 6 additions and 3 deletions.
  1. +4 −1 README.org
  2. +1 −1 compile
  3. +1 −1 compile-bc
View
@@ -78,6 +78,8 @@ TBD
*** Build all examples
#+BEGIN_SRC shell
+git clone --recursive https://github.com/thi-ng/c-thing
+
premake gmake
make config=release_sse
#+END_SRC
@@ -161,7 +163,7 @@ To compile with Emscripten & open in browser: [[http://localhost:8000/glfw.html]
--llvm-lto 1 \
--closure 1 \
--preload-file assets/suzanne.stl \
- -Isrc \
+ -Isrc -Iext \
-o glfw.html \
examples/glfw/*.c obj/libcthing.bc
@@ -273,6 +275,7 @@ bin/release/ex-voronoi -p -w 757 -h 450 > iris-voronoi.svg
The library itself has no 3rd party dependencies. Some of the examples
however use these additional libs:
+- [[https://github.com/thi-ng/ct-head][ct-head]] (included as submodule)
- [[https://github.com/nothings/stb][stb_image]] (bundled under =/examples/common=)
- [[http://www.glfw.org/][GLFW3.2+]]
View
@@ -8,7 +8,7 @@ SRC_DIRS="src/data src/geom src/geom/clip src/math src/mem src/sim"
for d in $SRC_DIRS; do for f in `ls $d/*.c`; do SRC="$SRC $f"; done; done;
TESTS=
-CFLAGS="-std=c11 -O3 -Isrc"
+CFLAGS="-std=c11 -O3 -Isrc -Iext"
EMFLAGS="-s ASM_JS=1 -s ASSERTIONS=0 -s INVOKE_RUN=0 -s AGGRESSIVE_VARIABLE_ELIMINATION=1 -s MODULARIZE=1 -s NO_EXIT_RUNTIME=1 -s TOTAL_MEMORY='48*1024*1024' --js-library src/rt_cthing.js"
OUT=cthing.js
MIN=cthing.min.js
View
@@ -4,7 +4,7 @@ SRC=;
SRC_DIRS="src/data src/geom src/geom/clip src/math src/mem src/sim"
for d in $SRC_DIRS; do for f in `ls $d/*.c`; do SRC="$SRC $f"; done; done;
-CFLAGS="-std=c11 -Os -Isrc -DCT_NO_EXPORT"
+CFLAGS="-std=c11 -Os -Isrc -Iext -DCT_NO_EXPORT"
EMFLAGS="-s ASM_JS=1 -s ASSERTIONS=0 --js-library src/rt_cthing.js"
BUILD_DIR=obj
OUT=$BUILD_DIR/libcthing.bc

0 comments on commit 49f2701

Please sign in to comment.