Commit 0dbb20a6 authored by Maxwell F. (Max) Chen's avatar Maxwell F. (Max) Chen
Browse files

updated makefile

parent 24dc7506
Pipeline #100295 failed with stage
in 0 seconds
Showing with 10 additions and 5 deletions
+10 -5
......@@ -49,8 +49,7 @@ CFLAGS += -Iinclude $(shell sdl2-config --cflags) -Wall -g -fno-omit-frame-point
# -g enables DWARF support, for debugging purposes
# -gsource-map --source-map-base http://localhost:8000/bin/ creates a source map from the C file for debugging
EMCC = emcc
EMCC_FLAGS = -s EXIT_RUNTIME=1 -s ALLOW_MEMORY_GROWTH=1 -s INITIAL_MEMORY=655360000 -s USE_SDL=2 -s USE_SDL_GFX=2 -s USE_SDL_IMAGE=2 -s SDL2_IMAGE_FORMATS='["png"]' -s USE_SDL_TTF=2 -s USE_SDL_MIXER=2 -s ASSERTIONS=1 -O2 -g -gsource-map --source-map-base http://labradoodle.caltech.edu:$(shell cs3-port)/bin/
EMCC_FLAGS = -s EXIT_RUNTIME=1 -s ALLOW_MEMORY_GROWTH=1 -s INITIAL_MEMORY=655360000 -s USE_SDL=2 -s USE_SDL_GFX=2 -s USE_SDL_IMAGE=2 -s SDL2_IMAGE_FORMATS='["png"]' -s USE_SDL_TTF=2 -s USE_SDL_MIXER=2 -s ASSERTIONS=1 -O2 -g -gsource-map --use-preload-plugins --preload-file assets --source-map-base http://labradoodle.caltech.edu:$(shell cs3-port)/bin/
# Compiler flag that links the program with the math library
LIB_MATH = -lm
# Compiler flags that link the program with the math library
......@@ -78,7 +77,7 @@ DEMO_BINS = $(addsuffix .demo.html, $(addprefix bin/,$(DEMOS)))
all: $(TEST_BINS) $(DEMO_BINS) server
demo: $(DEMO_BINS) server
game: bin/game.demo.html server
game: bin/game.html server
# Make the python server for your demos
# To run this, type 'make server'
......@@ -117,11 +116,17 @@ out/%.wasm.o: tests/%.c # or "tests"
# Unlike the out/%.wasm.o rule, this uses the LIBS flags and omits the -c flag,
# since it is building a full executable. Also notice it uses our EMCC_FLAGS
DEMO_REF = emscripten vector polygon sdl_wrapper vec_list
WASM_REF_OBJS = $(addprefix ref/,$(DEMO_REF:=.wasm.ref.o))
DEMO_REF_OBJS = $(addprefix ref/,$(DEMO_REF:=.wasm.ref.o))
GAME_REF = emscripten vector
GAME_REF_OBJS = $(addprefix ref/,$(GAME_REF:=.wasm.ref.o))
bin/%.demo.html: out/%.wasm.o $(WASM_REF_OBJS)
bin/%.demo.html: out/%.wasm.o $(DEMO_REF_OBJS)
$(EMCC) $(EMCC_FLAGS) $(CFLAGS) $(LIBS) $^ -o $@
bin/game.html: out/game.wasm.o out/sdl_wrapper.wasm.o $(GAME_REF_OBJS)
$(EMCC) $(EMCC_FLAGS) $(CFLAGS) $(LIBS) $^ -o $@
# Builds the test suite executables from the corresponding test .o file
# and the library .o files. The only difference from the demo build command
# is that it doesn't link the SDL libraries.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment