-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
455 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 ../../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 ../../src/ | ||
@-$(RM) $(LIBREBOUND) | ||
@$(LINKORCOPYLIBREBOUND) | ||
@echo "" | ||
|
||
clean: | ||
@echo "Cleaning up shared library $(LIBREBOUND) ..." | ||
$(MAKE) -C ../../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 -I../../src/ ../../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 -I../../src/ ../../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 |
Oops, something went wrong.