File tree 1 file changed +11
-1
lines changed
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,16 @@ INCLUDE = -I$(PWD)/include
10
10
# Libraries
11
11
LIBS = -DARMA_DONT_USE_WRAPPER -L$(PWD ) -lxatu -larmadillo -lopenblas -llapack -larpack -fopenmp -lgfortran
12
12
13
+ # Conditional flags for compilation
14
+ ifeq ($(DEBUG ) , 1)
15
+ CFLAGS = -Wall -lm -g
16
+ FFLAGS = -Wall -Wno-tabs -lm -g
17
+ endif
18
+ ifeq ($(HDF5 ) , 1)
19
+ CFLAGS += -DARMA_USE_HDF5
20
+ LIBS += -lhdf5
21
+ endif
22
+
13
23
# Compilation targets
14
24
CC_SRC_FILES := $(wildcard src/* .cpp)
15
25
OBJECTS := $(patsubst src/% .cpp, build/% .o, $(CC_SRC_FILES ) )
@@ -22,7 +32,7 @@ dummy_build_folder := $(shell mkdir -p build)
22
32
dummy_bin_folder := $(shell mkdir -p bin)
23
33
24
34
build : $(OBJECTS )
25
- ar rcs libxatu.a $(OBJECTS )
35
+ ar rcs libxatu.a $(OBJECTS )
26
36
27
37
xatu : main/xatu.cpp $(OBJECTS )
28
38
$(CC ) -o bin/$@ $< $(CFLAGS ) $(INCLUDE ) $(LIBS )
You can’t perform that action at this time.
0 commit comments