Skip to content

Commit

Permalink
wasm makefile fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Unreal-Dan committed Dec 23, 2023
1 parent be2173e commit a828f2c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions VortexEngine/VortexLib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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=\
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a828f2c

Please sign in to comment.