-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (32 loc) · 810 Bytes
/
Makefile
File metadata and controls
48 lines (32 loc) · 810 Bytes
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
include config_linux.mk
MF = Makefile
CC = g++
FC = gfortran
EXE = qmc.x
SOLVER = ./poisson_solver
SRC= $(wildcard *.cpp)
SRCEXT= lebedev_grid/sphere_lebedev_rule.cpp
FORTRAN_SRC_TOP=$(wildcard *.f90)
FORTRAN_SRC= $(wildcard $(SOLVER)/*.f90) $(wildcard $(SOLVER)/*.f)
FORTRAN_OBJ_=$(FORTRAN_SRC:.f90=.o)
FORTRAN_OBJ=$(FORTRAN_OBJ_:.f=.o)
#
# No need to edit below this line
#
.SUFFIXES:
.SUFFIXES: .f90 .cpp .o
OBJ = $(SRC:.cpp=.o) $(SRCEXT:.cpp=.o) $(FORTRAN_SRC_TOP:.f90=.o)
.cpp.o:
$(CC) $(CFLAGS) -c $< -o $@
.f90.o:
$(FC) $(FFLAGS) -c $< -o $@
all: $(EXE)
test:
@echo $(OBJ)
$(EXE): $(OBJ)
cd $(SOLVER); make
$(CC) $(LIBS) -o $@ $(OBJ) $(FORTRAN_OBJ) $(LFLAGS)
$(OBJ): $(MF)
clean:
cd $(SOLVER); make clean
rm -fv $(OBJ) $(EXE) *~