From a828f2c22f669b6626ecf49762602b99da43febc Mon Sep 17 00:00:00 2001 From: Dan Date: Fri, 22 Dec 2023 22:08:17 -0800 Subject: [PATCH] wasm makefile fixes --- VortexEngine/VortexLib/Makefile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/VortexEngine/VortexLib/Makefile b/VortexEngine/VortexLib/Makefile index d3e58ef22c..1081f57168 100644 --- a/VortexEngine/VortexLib/Makefile +++ b/VortexEngine/VortexLib/Makefile @@ -17,7 +17,12 @@ MAKE=make RM=rm -rf RANLIB=ranlib -CFLAGS=-O2 -g -Wall +CFLAGS=-O2 -Wall + +# add -g flag for debug symbols if we're not using wasm +ifndef WASM +CFLAGS += -g +endif # compiler defines DEFINES=\ @@ -31,7 +36,8 @@ INCLUDES=\ ifdef WASM DEFINES += -D WASM -CFLAGS += --bind -s MODULARIZE=1 -s EXPORT_ES6=1 -s EXPORT_NAME='VortexLib' +# this was used before but I think only the above is necessary +#CFLAGS += --bind -s MODULARIZE=1 -s EXPORT_ES6=1 -s EXPORT_NAME='VortexLib' endif ifdef TESTFRAMEWORK @@ -114,7 +120,7 @@ vortex.a: $(DEPS) $(AR) $@ $^ VortexLib.js: $(DEPS) - $(CC) $(CFLAGS) $^ -o $@ $(LLIBS) + $(CC) $(CFLAGS) --bind $^ -o $@ $(LLIBS) # catch-all make target to generate .o and .d files %.o: %.cpp