-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile_OSX
38 lines (27 loc) · 883 Bytes
/
makefile_OSX
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
CC=g++
FC=gfortran
LAPACK_PATH= /Users/jtcantin/addLibs/lapack-3.5.0/
LAPACKE_PATH= /Users/jtcantin/addLibs/lapack-3.5.0/lapacke/include/
SUP_PATH1= ./src/
INCLUDES= -I $(SUP_PATH1) -I $(LAPACKE_PATH)
CFLAGS=-c -Wall -D OSX_LAPACKE -ggdb -O0 $(INCLUDES)
FCFLAGS=-c -D OSX_LAPACKE -ggdb -O0 -framework Accelerate $(INCLUDES)
LIB_SOURCES= $(SUP_PATH1)quantumPercolation.cpp $(SUP_PATH1)lapackCustInterface.cpp
LDFLAGS= -framework Accelerate -lgfortran $(LAPACK_PATH)liblapack.a $(LAPACK_PATH)liblapacke.a
SOURCES= $(LIB_SOURCES)
SOURCES2 = $(SOURCES:.cpp=.o)
OBJECTS= $(SOURCES2:.f=.o)
EXECUTABLE=qmPerc_OSX
#print_vars:
# echo $(SOURCES)
# echo $(SOURCES2)
# echo $(OBJECTS)
all: $(SOURCES) $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
$(CC) $(LDFLAGS) $(OBJECTS) -o $@
.cpp.o:
$(CC) $(CFLAGS) $< -o $@
.f.o:
$(FC) $(FCFLAGS) $< -o $@
clean:
rm -f $(OBJECTS) $(EXECUTABLE)