Skip to content

Commit

Permalink
rot
Browse files Browse the repository at this point in the history
  • Loading branch information
hannorein committed Sep 17, 2023
1 parent aaed7b8 commit f7f2b1f
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 66 deletions.
27 changes: 15 additions & 12 deletions examples/removing_particles_from_simulation/Makefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
export OPENGL=1
export OPENGL=0
include ../../src/Makefile.defs

all: librebound
# CCPROBLEM is defined in Makefile.defs to allow for
# a compact cross platform Makefile
all: problem.c $(LIBREBOUND)
@echo "Compiling $< ..."
$(CCPROBLEM)
@echo ""
@echo "Compiling problem file ..."
$(CC) -I../../src/ -Wl,-rpath,./ $(OPT) $(PREDEF) problem.c -L. -lrebound $(LIB) -o rebound
@echo "Compilation successful. To run REBOUND, execute the file '$(EXEREBOUND)'."
@echo ""
@echo "REBOUND compiled successfully."

librebound:
@echo "Compiling shared library librebound.so ..."
$(LIBREBOUND):
@echo "Compiling shared library $(LIBREBOUND) ..."
$(MAKE) -C ../../src/
@-rm -f librebound.so
@ln -s ../../src/librebound.so .
@-$(RM) $(LIBREBOUND)
@$(LINKORCOPYLIBREBOUND)
@echo ""

clean:
@echo "Cleaning up shared library librebound.so ..."
@-rm -f librebound.so
@echo "Cleaning up shared library $(LIBREBOUND) ..."
$(MAKE) -C ../../src/ clean
@echo "Cleaning up local directory ..."
@-rm -vf rebound
@-$(RM) $(LIBREBOUND)
@-$(RM) $(EXEREBOUND)
1 change: 0 additions & 1 deletion examples/removing_particles_from_simulation/problem.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <math.h>
#include "rebound.h"

Expand Down
25 changes: 14 additions & 11 deletions examples/restarting_simulation/Makefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
export OPENGL=0
include ../../src/Makefile.defs

all: librebound
# CCPROBLEM is defined in Makefile.defs to allow for
# a compact cross platform Makefile
all: problem.c $(LIBREBOUND)
@echo "Compiling $< ..."
$(CCPROBLEM)
@echo ""
@echo "Compiling problem file ..."
$(CC) -I../../src/ -Wl,-rpath,./ $(OPT) $(PREDEF) problem.c -L. -lrebound $(LIB) -o rebound
@echo "Compilation successful. To run REBOUND, execute the file '$(EXEREBOUND)'."
@echo ""
@echo "REBOUND compiled successfully."

librebound:
@echo "Compiling shared library librebound.so ..."
$(LIBREBOUND):
@echo "Compiling shared library $(LIBREBOUND) ..."
$(MAKE) -C ../../src/
@-rm -f librebound.so
@ln -s ../../src/librebound.so .
@-$(RM) $(LIBREBOUND)
@$(LINKORCOPYLIBREBOUND)
@echo ""

clean:
@echo "Cleaning up shared library librebound.so ..."
@-rm -f librebound.so
@echo "Cleaning up shared library $(LIBREBOUND) ..."
$(MAKE) -C ../../src/ clean
@echo "Cleaning up local directory ..."
@-rm -vf rebound
@-$(RM) $(LIBREBOUND)
@-$(RM) $(EXEREBOUND)
1 change: 0 additions & 1 deletion examples/restarting_simulation/problem.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <math.h>
#include "rebound.h"

Expand Down
43 changes: 14 additions & 29 deletions examples/restricted_threebody/Makefile
Original file line number Diff line number Diff line change
@@ -1,40 +1,25 @@
export OPENGL=1

# OpenMP
# On Mac OSX, we can use the CLANG compiler. But it requires some additional
# flags (see Makefile.defs in src/ directory). You also need to install the
# OpenMP library with homebrew:
# brew install libomp
# Alternatively use a compiler which supports OpenMP out of the box (gcc) and
# uncomment the following line:
# export CC=gcc

# Ucomment the following lines to turn on OPENMP
#ifeq ($(shell $(CC) -v 2>&1 | grep -c "clang"), 1)
#export OPENMPCLANG=1
#else
#export OPENMP=1
#endif


include ../../src/Makefile.defs

all: librebound
# CCPROBLEM is defined in Makefile.defs to allow for
# a compact cross platform Makefile
all: problem.c $(LIBREBOUND)
@echo "Compiling $< ..."
$(CCPROBLEM)
@echo ""
@echo "Compiling problem file ..."
$(CC) -I../../src/ -Wl,-rpath,./ $(OPT) $(PREDEF) problem.c -L. -lrebound $(LIB) -o rebound
@echo "Compilation successful. To run REBOUND, execute the file '$(EXEREBOUND)'."
@echo ""
@echo "REBOUND compiled successfully."

librebound:
@echo "Compiling shared library librebound.so ..."
$(LIBREBOUND):
@echo "Compiling shared library $(LIBREBOUND) ..."
$(MAKE) -C ../../src/
@-rm -f librebound.so
@ln -s ../../src/librebound.so .
@-$(RM) $(LIBREBOUND)
@$(LINKORCOPYLIBREBOUND)
@echo ""

clean:
@echo "Cleaning up shared library librebound.so ..."
@-rm -f librebound.so
@echo "Cleaning up shared library $(LIBREBOUND) ..."
$(MAKE) -C ../../src/ clean
@echo "Cleaning up local directory ..."
@-rm -vf rebound
@-$(RM) $(LIBREBOUND)
@-$(RM) $(EXEREBOUND)
1 change: 0 additions & 1 deletion examples/restricted_threebody/problem.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <math.h>
#include "rebound.h"

Expand Down
25 changes: 14 additions & 11 deletions examples/rotations/Makefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
export OPENGL=0
include ../../src/Makefile.defs

all: librebound
# CCPROBLEM is defined in Makefile.defs to allow for
# a compact cross platform Makefile
all: problem.c $(LIBREBOUND)
@echo "Compiling $< ..."
$(CCPROBLEM)
@echo ""
@echo "Compiling problem file ..."
$(CC) -I../../src/ -Wl,-rpath,./ $(OPT) $(PREDEF) problem.c -L. -lrebound $(LIB) -o rebound
@echo "Compilation successful. To run REBOUND, execute the file '$(EXEREBOUND)'."
@echo ""
@echo "REBOUND compiled successfully."

librebound:
@echo "Compiling shared library librebound.so ..."
$(LIBREBOUND):
@echo "Compiling shared library $(LIBREBOUND) ..."
$(MAKE) -C ../../src/
@-rm -f librebound.so
@ln -s ../../src/librebound.so .
@-$(RM) $(LIBREBOUND)
@$(LINKORCOPYLIBREBOUND)
@echo ""

clean:
@echo "Cleaning up shared library librebound.so ..."
@-rm -f librebound.so
@echo "Cleaning up shared library $(LIBREBOUND) ..."
$(MAKE) -C ../../src/ clean
@echo "Cleaning up local directory ..."
@-rm -vf rebound
@-$(RM) $(LIBREBOUND)
@-$(RM) $(EXEREBOUND)

0 comments on commit f7f2b1f

Please sign in to comment.