Update Makefile

This commit is contained in:
Cory Balaton 2023-10-02 21:50:32 +02:00
parent 5509efc301
commit b5c5020506
No known key found for this signature in database
GPG Key ID: 3E5FCEBFD80F432B

View File

@ -8,7 +8,7 @@ CLASSOBJS=$(CLASSSRCS:.cpp=.o)
INCLUDE=../include INCLUDE=../include
CFLAGS=-larmadillo -llapack -std=c++11 CFLAGS=-larmadillo -llapack -std=c++11 -O2
OPENMP=-fopenmp OPENMP=-fopenmp
# Add a debug flag when compiling (For the DEBUG macro in utils.hpp) # Add a debug flag when compiling (For the DEBUG macro in utils.hpp)
@ -24,7 +24,7 @@ endif
all: test_suite main all: test_suite main
# Rules for executables # Rules for executables
main: main.o $(LIBOBJS) main: main.o $(LIBOBJS) $(CLASSOBJS)
$(CC) $^ -o $@ $(CFLAGS) $(DBGFLAG) -I$(INCLUDE) $(OPENMP) $(CC) $^ -o $@ $(CFLAGS) $(DBGFLAG) -I$(INCLUDE) $(OPENMP)
test_suite: test_suite.o $(LIBOBJS) test_suite: test_suite.o $(LIBOBJS)
@ -32,7 +32,7 @@ test_suite: test_suite.o $(LIBOBJS)
# Rule for object files # Rule for object files
%.o: %.cpp %.o: %.cpp
$(CC) -c $^ -o $@ $(DBGFLAG) -I$(INCLUDE) $(OPENMP) $(CC) -c $^ -o $@ $(CFLAGS) $(DBGFLAG) -I$(INCLUDE) $(OPENMP)
clean: clean:
rm *.o rm *.o