-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
63 lines (45 loc) · 1.04 KB
/
Makefile
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
###########################
## compiler
###########################
CC =gcc
CXX =g++
###########################
## latex maker
###########################
PDFLATEX=pdflatex
###########################
## base compiler options
###########################
CFLAGS =-Wall -g -Wno-sign-compare#-fopenmp
CXXFLAGS =-Wall -g -Wno-sign-compare#-fopenmp
###########################
## link options
###########################
LIB=-lm -fopenmp
###########################
## virtual path
###########################
VPATH=doc:src:test
###########################
## targets
###########################
TAGET=formulations.pdf fdtd-1d-cpml.pdf
###########################
## objects
###########################
OBJECTS=main.o fdtd.o
###########################
## rules
###########################
.PHONY:all clean
all: doc main
doc:formulations.pdf fdtd-1d-cpml.pdf
main:$(OBJECTS)
$(CXX) -o $@ $^ $(LIB)
$(OBJECTS):%.o:%.cpp
$(CXX) -c $< $(CXXFLAGS)
## formulations
%.pdf:%.tex
$(PDFLATEX) $<
clean:
-rm -f $(TAGET) $(OBJECTS) *.log *.aux main