Skip to content

Commit

Permalink
Moved make variable logic to Makefile.defs, now callable from problem
Browse files Browse the repository at this point in the history
makefiles
  • Loading branch information
hannorein committed Jul 28, 2015
1 parent e2baddb commit 4727a6a
Show file tree
Hide file tree
Showing 32 changed files with 117 additions and 116 deletions.
4 changes: 2 additions & 2 deletions examples/J2/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export OPENGL=1
OPT+= -std=c99 -Wpointer-arith -D_GNU_SOURCE -O3 -march=native
include ../../src/Makefile.defs

all: librebound
@echo ""
@echo "Compiling problem file ..."
cc -I../../src/ -L. -Wl,-rpath,./ $(OPT) problem.c -lrebound -lm -o rebound
$(CC) -I../../src/ -Wl,-rpath,./ $(OPT) $(PREDEF) problem.c -L. -lrebound $(LIB) -o rebound
@echo ""
@echo "REBOUND compiled successfully."

Expand Down
4 changes: 2 additions & 2 deletions examples/bouncing_balls/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export OPENGL=1
OPT+= -std=c99 -Wpointer-arith -D_GNU_SOURCE -O3 -march=native
include ../../src/Makefile.defs

all: librebound
@echo ""
@echo "Compiling problem file ..."
cc -I../../src/ -L. -Wl,-rpath,./ $(OPT) problem.c -lrebound -lm -o rebound
$(CC) -I../../src/ -Wl,-rpath,./ $(OPT) $(PREDEF) problem.c -L. -lrebound $(LIB) -o rebound
@echo ""
@echo "REBOUND compiled successfully."

Expand Down
4 changes: 2 additions & 2 deletions examples/bouncing_balls_corners/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export OPENGL=1
OPT+= -std=c99 -Wpointer-arith -D_GNU_SOURCE -O3 -march=native
include ../../src/Makefile.defs

all: librebound
@echo ""
@echo "Compiling problem file ..."
cc -I../../src/ -L. -Wl,-rpath,./ $(OPT) problem.c -lrebound -lm -o rebound
$(CC) -I../../src/ -Wl,-rpath,./ $(OPT) $(PREDEF) problem.c -L. -lrebound $(LIB) -o rebound
@echo ""
@echo "REBOUND compiled successfully."

Expand Down
4 changes: 2 additions & 2 deletions examples/bouncing_string/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export OPENGL=1
OPT+= -std=c99 -Wpointer-arith -D_GNU_SOURCE -O3 -march=native
include ../../src/Makefile.defs

all: librebound
@echo ""
@echo "Compiling problem file ..."
cc -I../../src/ -L. -Wl,-rpath,./ $(OPT) problem.c -lrebound -lm -o rebound
$(CC) -I../../src/ -Wl,-rpath,./ $(OPT) $(PREDEF) problem.c -L. -lrebound $(LIB) -o rebound
@echo ""
@echo "REBOUND compiled successfully."

Expand Down
4 changes: 2 additions & 2 deletions examples/circumplanetarydust/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export OPENGL=1
OPT+= -std=c99 -Wpointer-arith -D_GNU_SOURCE -O3 -march=native
include ../../src/Makefile.defs

all: librebound
@echo ""
@echo "Compiling problem file ..."
cc -I../../src/ -L. -Wl,-rpath,./ $(OPT) problem.c -lrebound -lm -o rebound
$(CC) -I../../src/ -Wl,-rpath,./ $(OPT) $(PREDEF) problem.c -L. -lrebound $(LIB) -o rebound
@echo ""
@echo "REBOUND compiled successfully."

Expand Down
4 changes: 2 additions & 2 deletions examples/closeencounter/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export OPENGL=1
OPT+= -std=c99 -Wpointer-arith -D_GNU_SOURCE -O3 -march=native
include ../../src/Makefile.defs

all: librebound
@echo ""
@echo "Compiling problem file ..."
cc -I../../src/ -L. -Wl,-rpath,./ $(OPT) problem.c -lrebound -lm -o rebound
$(CC) -I../../src/ -Wl,-rpath,./ $(OPT) $(PREDEF) problem.c -L. -lrebound $(LIB) -o rebound
@echo ""
@echo "REBOUND compiled successfully."

Expand Down
4 changes: 2 additions & 2 deletions examples/closeencounter_hybrid/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export OPENGL=1
OPT+= -std=c99 -Wpointer-arith -D_GNU_SOURCE -O3 -march=native
include ../../src/Makefile.defs

all: librebound
@echo ""
@echo "Compiling problem file ..."
cc -I../../src/ -L. -Wl,-rpath,./ $(OPT) problem.c -lrebound -lm -o rebound
$(CC) -I../../src/ -Wl,-rpath,./ $(OPT) $(PREDEF) problem.c -L. -lrebound $(LIB) -o rebound
@echo ""
@echo "REBOUND compiled successfully."

Expand Down
4 changes: 2 additions & 2 deletions examples/closeencounter_record/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export OPENGL=1
OPT+= -std=c99 -Wpointer-arith -D_GNU_SOURCE -O3 -march=native
include ../../src/Makefile.defs

all: librebound
@echo ""
@echo "Compiling problem file ..."
cc -I../../src/ -L. -Wl,-rpath,./ $(OPT) problem.c -lrebound -lm -o rebound
$(CC) -I../../src/ -Wl,-rpath,./ $(OPT) $(PREDEF) problem.c -L. -lrebound $(LIB) -o rebound
@echo ""
@echo "REBOUND compiled successfully."

Expand Down
4 changes: 2 additions & 2 deletions examples/dragforce/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export OPENGL=1
OPT+= -std=c99 -Wpointer-arith -D_GNU_SOURCE -O3 -march=native
include ../../src/Makefile.defs

all: librebound
@echo ""
@echo "Compiling problem file ..."
cc -I../../src/ -L. -Wl,-rpath,./ $(OPT) problem.c -lrebound -lm -o rebound
$(CC) -I../../src/ -Wl,-rpath,./ $(OPT) $(PREDEF) problem.c -L. -lrebound $(LIB) -o rebound
@echo ""
@echo "REBOUND compiled successfully."

Expand Down
4 changes: 2 additions & 2 deletions examples/eccentric_orbit/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export OPENGL=1
OPT+= -std=c99 -Wpointer-arith -D_GNU_SOURCE -O3 -march=native
include ../../src/Makefile.defs

all: librebound
@echo ""
@echo "Compiling problem file ..."
cc -I../../src/ -L. -Wl,-rpath,./ $(OPT) problem.c -lrebound -lm -o rebound
$(CC) -I../../src/ -Wl,-rpath,./ $(OPT) $(PREDEF) problem.c -L. -lrebound $(LIB) -o rebound
@echo ""
@echo "REBOUND compiled successfully."

Expand Down
4 changes: 2 additions & 2 deletions examples/granulardynamics/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export OPENGL=1
OPT+= -std=c99 -Wpointer-arith -D_GNU_SOURCE -O3 -march=native
include ../../src/Makefile.defs

all: librebound
@echo ""
@echo "Compiling problem file ..."
cc -I../../src/ -L. -Wl,-rpath,./ $(OPT) problem.c -lrebound -lm -o rebound
$(CC) -I../../src/ -Wl,-rpath,./ $(OPT) $(PREDEF) problem.c -L. -lrebound $(LIB) -o rebound
@echo ""
@echo "REBOUND compiled successfully."

Expand Down
4 changes: 2 additions & 2 deletions examples/kozai/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export OPENGL=1
OPT+= -std=c99 -Wpointer-arith -D_GNU_SOURCE -O3 -march=native
include ../../src/Makefile.defs

all: librebound
@echo ""
@echo "Compiling problem file ..."
cc -I../../src/ -L. -Wl,-rpath,./ $(OPT) problem.c -lrebound -lm -o rebound
$(CC) -I../../src/ -Wl,-rpath,./ $(OPT) $(PREDEF) problem.c -L. -lrebound $(LIB) -o rebound
@echo ""
@echo "REBOUND compiled successfully."

Expand Down
4 changes: 2 additions & 2 deletions examples/megno/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export OPENGL=1
OPT+= -std=c99 -Wpointer-arith -D_GNU_SOURCE -O3 -march=native
include ../../src/Makefile.defs

all: librebound
@echo ""
@echo "Compiling problem file ..."
cc -I../../src/ -L. -Wl,-rpath,./ $(OPT) problem.c -lrebound -lm -o rebound
$(CC) -I../../src/ -Wl,-rpath,./ $(OPT) $(PREDEF) problem.c -L. -lrebound $(LIB) -o rebound
@echo ""
@echo "REBOUND compiled successfully."

Expand Down
4 changes: 2 additions & 2 deletions examples/mergers/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export OPENGL=1
OPT+= -std=c99 -Wpointer-arith -D_GNU_SOURCE -O3 -march=native
include ../../src/Makefile.defs

all: librebound
@echo ""
@echo "Compiling problem file ..."
cc -I../../src/ -L. -Wl,-rpath,./ $(OPT) problem.c -lrebound -lm -o rebound
$(CC) -I../../src/ -Wl,-rpath,./ $(OPT) $(PREDEF) problem.c -L. -lrebound $(LIB) -o rebound
@echo ""
@echo "REBOUND compiled successfully."

Expand Down
4 changes: 2 additions & 2 deletions examples/outer_solar_system/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export OPENGL=1
OPT+= -std=c99 -Wpointer-arith -D_GNU_SOURCE -O3 -march=native
include ../../src/Makefile.defs

all: librebound
@echo ""
@echo "Compiling problem file ..."
cc -I../../src/ -L. -Wl,-rpath,./ $(OPT) problem.c -lrebound -lm -o rebound
$(CC) -I../../src/ -Wl,-rpath,./ $(OPT) $(PREDEF) problem.c -L. -lrebound $(LIB) -o rebound
@echo ""
@echo "REBOUND compiled successfully."

Expand Down
4 changes: 2 additions & 2 deletions examples/overstability/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export OPENGL=1
OPT+= -std=c99 -Wpointer-arith -D_GNU_SOURCE -O3 -march=native
include ../../src/Makefile.defs

all: librebound
@echo ""
@echo "Compiling problem file ..."
cc -I../../src/ -L. -Wl,-rpath,./ $(OPT) problem.c -lrebound -lm -o rebound
$(CC) -I../../src/ -Wl,-rpath,./ $(OPT) $(PREDEF) problem.c -L. -lrebound $(LIB) -o rebound
@echo ""
@echo "REBOUND compiled successfully."

Expand Down
4 changes: 2 additions & 2 deletions examples/particles_ids_and_removal/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export OPENGL=1
OPT+= -std=c99 -Wpointer-arith -D_GNU_SOURCE -O3 -march=native
include ../../src/Makefile.defs

all: librebound
@echo ""
@echo "Compiling problem file ..."
cc -I../../src/ -L. -Wl,-rpath,./ $(OPT) problem.c -lrebound -lm -o rebound
$(CC) -I../../src/ -Wl,-rpath,./ $(OPT) $(PREDEF) problem.c -L. -lrebound $(LIB) -o rebound
@echo ""
@echo "REBOUND compiled successfully."

Expand Down
4 changes: 2 additions & 2 deletions examples/planetary_migration/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export OPENGL=1
OPT+= -std=c99 -Wpointer-arith -D_GNU_SOURCE -O3 -march=native
include ../../src/Makefile.defs

all: librebound
@echo ""
@echo "Compiling problem file ..."
cc -I../../src/ -L. -Wl,-rpath,./ $(OPT) problem.c -lrebound -lm -o rebound
$(CC) -I../../src/ -Wl,-rpath,./ $(OPT) $(PREDEF) problem.c -L. -lrebound $(LIB) -o rebound
@echo ""
@echo "REBOUND compiled successfully."

Expand Down
4 changes: 2 additions & 2 deletions examples/prdrag/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export OPENGL=1
OPT+= -std=c99 -Wpointer-arith -D_GNU_SOURCE -O3 -march=native
include ../../src/Makefile.defs

all: librebound
@echo ""
@echo "Compiling problem file ..."
cc -I../../src/ -L. -Wl,-rpath,./ $(OPT) problem.c -lrebound -lm -o rebound
$(CC) -I../../src/ -Wl,-rpath,./ $(OPT) $(PREDEF) problem.c -L. -lrebound $(LIB) -o rebound
@echo ""
@echo "REBOUND compiled successfully."

Expand Down
4 changes: 2 additions & 2 deletions examples/profiling/Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
export OPENGL=1
export PROFILING=1
OPT+= -std=c99 -Wpointer-arith -D_GNU_SOURCE -O3 -march=native
include ../../src/Makefile.defs

all: librebound
@echo ""
@echo "Compiling problem file ..."
cc -I../../src/ -L. -Wl,-rpath,./ $(OPT) problem.c -lrebound -lm -o rebound
$(CC) -I../../src/ -Wl,-rpath,./ $(OPT) $(PREDEF) problem.c -L. -lrebound $(LIB) -o rebound
@echo ""
@echo "REBOUND compiled successfully."

Expand Down
4 changes: 2 additions & 2 deletions examples/restarting_simulation/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export OPENGL=1
OPT+= -std=c99 -Wpointer-arith -D_GNU_SOURCE -O3 -march=native
include ../../src/Makefile.defs

all: librebound
@echo ""
@echo "Compiling problem file ..."
cc -I../../src/ -L. -Wl,-rpath,./ $(OPT) problem.c -lrebound -lm -o rebound
$(CC) -I../../src/ -Wl,-rpath,./ $(OPT) $(PREDEF) problem.c -L. -lrebound $(LIB) -o rebound
@echo ""
@echo "REBOUND compiled successfully."

Expand Down
4 changes: 2 additions & 2 deletions examples/restricted_threebody/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export OPENGL=1
OPT+= -std=c99 -Wpointer-arith -D_GNU_SOURCE -O3 -march=native
include ../../src/Makefile.defs

all: librebound
@echo ""
@echo "Compiling problem file ..."
cc -I../../src/ -L. -Wl,-rpath,./ $(OPT) problem.c -lrebound -lm -o rebound
$(CC) -I../../src/ -Wl,-rpath,./ $(OPT) $(PREDEF) problem.c -L. -lrebound $(LIB) -o rebound
@echo ""
@echo "REBOUND compiled successfully."

Expand Down
4 changes: 2 additions & 2 deletions examples/selfgravity_disc/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export OPENGL=1
OPT+= -std=c99 -Wpointer-arith -D_GNU_SOURCE -O3 -march=native
include ../../src/Makefile.defs

all: librebound
@echo ""
@echo "Compiling problem file ..."
cc -I../../src/ -L. -Wl,-rpath,./ $(OPT) problem.c -lrebound -lm -o rebound
$(CC) -I../../src/ -Wl,-rpath,./ $(OPT) $(PREDEF) problem.c -L. -lrebound $(LIB) -o rebound
@echo ""
@echo "REBOUND compiled successfully."

Expand Down
4 changes: 2 additions & 2 deletions examples/selfgravity_plummer/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export OPENGL=1
OPT+= -std=c99 -Wpointer-arith -D_GNU_SOURCE -O3 -march=native
include ../../src/Makefile.defs

all: librebound
@echo ""
@echo "Compiling problem file ..."
cc -I../../src/ -L. -Wl,-rpath,./ $(OPT) problem.c -lrebound -lm -o rebound
$(CC) -I../../src/ -Wl,-rpath,./ $(OPT) $(PREDEF) problem.c -L. -lrebound $(LIB) -o rebound
@echo ""
@echo "REBOUND compiled successfully."

Expand Down
4 changes: 2 additions & 2 deletions examples/shearing_sheet/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export OPENGL=1
OPT+= -std=c99 -Wpointer-arith -D_GNU_SOURCE -O3 -march=native
include ../../src/Makefile.defs

all: librebound
@echo ""
@echo "Compiling problem file ..."
cc -I../../src/ -L. -Wl,-rpath,./ $(OPT) problem.c -lrebound -lm -o rebound
$(CC) -I../../src/ -Wl,-rpath,./ $(OPT) $(PREDEF) problem.c -L. -lrebound $(LIB) -o rebound
@echo ""
@echo "REBOUND compiled successfully."

Expand Down
4 changes: 2 additions & 2 deletions examples/shearing_sheet_2/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export OPENGL=1
OPT+= -std=c99 -Wpointer-arith -D_GNU_SOURCE -O3 -march=native
include ../../src/Makefile.defs

all: librebound
@echo ""
@echo "Compiling problem file ..."
cc -I../../src/ -L. -Wl,-rpath,./ $(OPT) problem.c -lrebound -lm -o rebound
$(CC) -I../../src/ -Wl,-rpath,./ $(OPT) $(PREDEF) problem.c -L. -lrebound $(LIB) -o rebound
@echo ""
@echo "REBOUND compiled successfully."

Expand Down
4 changes: 2 additions & 2 deletions examples/simplest/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export OPENGL=1
OPT+= -std=c99 -Wpointer-arith -D_GNU_SOURCE -O3 -march=native
include ../../src/Makefile.defs

all: librebound
@echo ""
@echo "Compiling problem file ..."
cc -I../../src/ -L. -Wl,-rpath,./ $(OPT) problem.c -lrebound -lm -o rebound
$(CC) -I../../src/ -Wl,-rpath,./ $(OPT) $(PREDEF) problem.c -L. -lrebound $(LIB) -o rebound
@echo ""
@echo "REBOUND compiled successfully."

Expand Down
4 changes: 2 additions & 2 deletions examples/solar_system/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export OPENGL=1
OPT+= -std=c99 -Wpointer-arith -D_GNU_SOURCE -O3 -march=native
include ../../src/Makefile.defs

all: librebound
@echo ""
@echo "Compiling problem file ..."
cc -I../../src/ -L. -Wl,-rpath,./ $(OPT) problem.c -lrebound -lm -o rebound
$(CC) -I../../src/ -Wl,-rpath,./ $(OPT) $(PREDEF) problem.c -L. -lrebound $(LIB) -o rebound
@echo ""
@echo "REBOUND compiled successfully."

Expand Down
4 changes: 2 additions & 2 deletions examples/spreading_ring/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export OPENGL=1
OPT+= -std=c99 -Wpointer-arith -D_GNU_SOURCE -O3 -march=native
include ../../src/Makefile.defs

all: librebound
@echo ""
@echo "Compiling problem file ..."
cc -I../../src/ -L. -Wl,-rpath,./ $(OPT) problem.c -lrebound -lm -o rebound
$(CC) -I../../src/ -Wl,-rpath,./ $(OPT) $(PREDEF) problem.c -L. -lrebound $(LIB) -o rebound
@echo ""
@echo "REBOUND compiled successfully."

Expand Down
4 changes: 2 additions & 2 deletions examples/star_of_david/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export OPENGL=1
OPT+= -std=c99 -Wpointer-arith -D_GNU_SOURCE -O3 -march=native
include ../../src/Makefile.defs

all: librebound
@echo ""
@echo "Compiling problem file ..."
cc -I../../src/ -L. -Wl,-rpath,./ $(OPT) problem.c -lrebound -lm -o rebound
$(CC) -I../../src/ -Wl,-rpath,./ $(OPT) $(PREDEF) problem.c -L. -lrebound $(LIB) -o rebound
@echo ""
@echo "REBOUND compiled successfully."

Expand Down
Loading

0 comments on commit 4727a6a

Please sign in to comment.