-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
76 lines (57 loc) · 1.14 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
64
65
66
67
68
69
70
71
72
73
74
TAR = sim
PLOT = plot.py
OBJS = sim.o
PROF2VTK= ~/prof2vtk
FFMPEG = ffmpeg
PROF2POV= prof2pov
RENDER = render.py
FMT = out/out%05d
PROFFMT = $(FMT).prof
VTKFMT = $(FMT).vtu
POVFMT = $(FMT).pov
PNGFMT = $(FMT).png
FNUM = 99999
OUT_INTERVAL = 10
#LUA_FILE= setting.lua
CC = g++
CFLAGS = --std=c++11 -g
CFLAGS = -I/usr/include/lua5.3/
LDFLAGS = -lm -L/usr/lib/ -llua5.3
%.o:%.cpp
g++ -c $< $(CFLAGS)
sim:$(OBJS)
$(CC) -o $(TAR) $(OBJS) $(LDFLAGS)
run:
make
./$(TAR)
plot:
./$(PLOT) show 2 $(PROFFMT) $(FNUM)
plot3:
./$(PLOT) show 3 $(PROFFMT) $(FNUM)
plotgif2:
./$(PLOT) save 2 $(PROFFMT) $(FNUM)
plotgif3:
./$(PLOT) save 3 $(PROFFMT) $(FNUM)
vtu:
$(PROF2VTK) $(PROFFMT) $(VTKFMT) $(FNUM)
run-vtu:
make run
tweet "sim end."
make vtu
tweet "prof->vtu end."
tar zcvf vtu-data.tar.gz out/*.vtu
tweet "tar end."
conv:$(PROF2POV)
./$< $(PROFFMT) $(FNUM) $(LUA_FILE)
render:
./$(RENDER) $(POVFMT) 0 $(FNUM) $(OUT_INTERVAL)
gif:
convert out/*.png anim.gif
mp4:
$(FFMPEG) -r 30 -i $(PNGFMT) -vcodec libx264 -pix_fmt yuv420p -r 60 out.mp4 > ffmpeg_status
clean:
rm *.prof
rm *.o
rm $(TAR)
$(PROF2POV):prof2pov.o
g++ -o $@ $^ $(LDFLAGS)