Add openmp to compilation

This commit is contained in:
Cory Balaton 2023-09-26 12:14:42 +02:00
parent 751f356498
commit b80220f3e7
No known key found for this signature in database
GPG Key ID: 3E5FCEBFD80F432B

View File

@ -6,6 +6,7 @@ LIBOBJS=$(LIBSRCS:.cpp=.o)
INCLUDE=../include
CFLAGS=-larmadillo -llapack -std=c++11
OPENMP=-fopenmp
# Add a debug flag when compiling (For the DEBUG macro in utils.hpp)
DEBUG ?= 0
@ -22,14 +23,14 @@ all: test_suite main
# Rules for executables
main: main.o $(LIBOBJS)
$(CC) $^ -o $@ $(CFLAGS) $(DBGFLAG) -I$(INCLUDE)
$(CC) $^ -o $@ $(CFLAGS) $(DBGFLAG) -I$(INCLUDE) $(OPENMP)
test_suite: test_suite.o $(LIBOBJS)
$(CC) $^ -o $@ $(CFLAGS) $(DBGFLAG) -I$(INCLUDE)
$(CC) $^ -o $@ $(CFLAGS) $(DBGFLAG) -I$(INCLUDE) $(OPENMP)
# Rule for object files
%.o: %.cpp
$(CC) -c $^ -o $@ $(DBGFLAG) -I$(INCLUDE)
$(CC) -c $^ -o $@ $(DBGFLAG) -I$(INCLUDE) $(OPENMP)
# Make documentation
doxygen: