Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs3-24sp
project01
Commits
0dbb20a6
Commit
0dbb20a6
authored
1 year ago
by
Maxwell F. (Max) Chen
Browse files
Options
Download
Email Patches
Plain Diff
updated makefile
parent
24dc7506
master
Pipeline
#100295
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Makefile
+10
-5
Makefile
with
10 additions
and
5 deletions
+10
-5
Makefile
View file @
0dbb20a6
...
...
@@ -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.
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help