Coryab/implement penning trap simulate #6

Merged
coryab merged 16 commits from coryab/implement-PenningTrap-simulate into develop 2023-10-14 01:13:37 +00:00
Showing only changes of commit 11757e5e28 - Show all commits

View File

@ -8,7 +8,7 @@ CLASSOBJS=$(CLASSSRCS:.cpp=.o)
INCLUDE=../include
CFLAGS=-larmadillo -llapack -std=c++11 -O2
CFLAGS=-Wall -larmadillo -llapack -std=c++11 -O3
OPENMP=-fopenmp
# Add a debug flag when compiling (For the DEBUG macro in utils.hpp)
@ -19,20 +19,27 @@ else
DBGFLAG=
endif
PROFILE ?= 0
ifeq ($(PROFILE), 1)
PROFFLAG=-pg
else
PROFFLAG=
endif
.PHONY: clean
all: test_suite main
# Rules for executables
main: main.o $(LIBOBJS) $(CLASSOBJS)
$(CC) $^ -o $@ $(CFLAGS) $(DBGFLAG) -I$(INCLUDE) $(OPENMP)
$(CC) $^ -o $@ $(CFLAGS) $(DBGFLAG) $(PROFFLAG) -I$(INCLUDE) $(OPENMP)
test_suite: test_suite.o $(LIBOBJS) $(CLASSOBJS)
$(CC) $^ -o $@ $(CFLAGS) $(DBGFLAG) -I$(INCLUDE) $(OPENMP)
$(CC) $^ -o $@ $(CFLAGS) $(DBGFLAG) $(PROFFLAG) -I$(INCLUDE) $(OPENMP)
# Rule for object files
%.o: %.cpp
$(CC) -c $^ -o $@ $(CFLAGS) $(DBGFLAG) -I$(INCLUDE) $(OPENMP)
$(CC) -c $^ -o $@ $(CFLAGS) $(DBGFLAG) $(PROFFLAG) -I$(INCLUDE) $(OPENMP)
clean:
rm *.o