-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
35 lines (30 loc) · 1.46 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
export OPENGL=0# Set this to 1 to enable OpenGL
export SERVER=1# Set this to 1 to enable the visualization web server
include rebound_repo/src/Makefile.defs
# CCPROBLEM is defined in Makefile.defs to allow for
# a compact cross platform Makefile
.PHONY: all librebound
all: problem.c librebound
@echo "Compiling $< ..."
$(CCPROBLEM)
@echo ""
@echo "Compilation successful. To run REBOUND, execute the file '$(EXEREBOUND)'."
@echo ""
librebound:
@echo "Compiling shared library $(LIBREBOUND) ..."
$(MAKE) -C rebound_repo/src/
@-$(RM) $(LIBREBOUND)
@$(LINKORCOPYLIBREBOUND)
@echo ""
clean:
@echo "Cleaning up shared library $(LIBREBOUND) ..."
$(MAKE) -C rebound_repo/src/ clean
@echo "Cleaning up local directory ..."
@-$(RM) $(LIBREBOUND)
@-$(RM) $(EXEREBOUND)
rebound_webgl.html: problem.c
@echo "Compiling problem.c with emscripten (WebGL enabled)..."
emcc -O3 -Irebound_repo/src/ rebound_repo/src/*.c problem.c -DSERVERHIDEWARNING -DOPENGL=1 -sSTACK_SIZE=655360 -s USE_GLFW=3 -s FULL_ES3=1 -sASYNCIFY -sSINGLE_FILE -sEXPORTED_RUNTIME_METHODS="callMain" --shell-file ../../web_client/shell_rebound_webgl.html -o rebound_webgl.html
rebound_console.html: problem.c
@echo "Compiling problem.c with emscripten (WebGL disabled)..."
emcc -O3 -Irebound_repo/src/ rebound_repo/src/*.c problem.c -DSERVERHIDEWARNING -sSTACK_SIZE=655360 -sASYNCIFY -sSINGLE_FILE -sEXPORTED_RUNTIME_METHODS="callMain" --shell-file ../../web_client/shell_rebound_console.html -o rebound_console.html