-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
74 lines (57 loc) · 1.17 KB
/
Copy pathMakefile
File metadata and controls
74 lines (57 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Tool settings
CC=icc
DB=gdb
OPENMP=yes
THREADS=12
DEBUG=no
AA=no
# Test files
FPOINT=./dat/test_polar_727902.txt
FCONTOUR=./dat/Polar_Cone.txt
# Main program
TARGET=pq
OBJ=$(TARGET)
ifeq ($(OPENMP),yes)
MODE=OPENMP
CORE=pq_core_openmp
else
MODE=SEQ
CORE=pq_core
endif
ifeq ($(DEBUG),yes)
DBFLAG=-g
else
DBFLAB=
endif
ifeq ($(CC),icc)
OMPFLAG=-openmp
OPTFLAG=-fast
else
OMPFLAG=-fopenmp
OPTFLAG=
endif
ifeq ($(AA),yes)
LIBYALAA=/usr/local/lib/libyalaa.so /usr/local/cxsc/lib/libcxsc.so
else
LIBYALAA=
endif
CCFLAGS=$(OMPFLAG) $(OPTFLAG) -O3 -Wall -I/usr/local/cxsc/include -I./headers -D$(MODE) -DNT=$(THREADS) $(DBFLAG)
CLFLAGS=-lm $(OMPFLAG)
.PHONY: debug run clean
all: $(OBJ)
pq_io.o: ./src/pq_io.cpp
$(CC) $(CCFLAGS) -c $^ -o $@
pq_wrapper.o: ./src/pq_wrapper.cpp
$(CC) $(CCFLAGS) -c $^ -o $@
$(CORE).o: ./src/$(CORE).cpp
$(CC) $(CCFLAGS) -c $^ -o $@
$(OBJ).o: ./src/$(TARGET).cpp
$(CC) $(CCFLAGS) -c $^ -o $@
$(OBJ): $(OBJ).o $(CORE).o pq_wrapper.o pq_io.o $(LIBYALAA)
$(CC) $^ -o $@ $(CLFLAGS)
debug: $(OBJ)
$(DB) --args ./$(OBJ) 0 $(FPOINT) $(FCONTOUR) 0 11
run: $(OBJ)
./$(OBJ) 0 $(FPOINT) $(FCONTOUR) 0 11
clean:
rm -f $(OBJ) *.o *~ ./headers/*~ ./src/*~ ./dat/*~