-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
32 lines (26 loc) · 982 Bytes
/
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
# CC set in external env., machine specific settings in environment.sh
# CFLAGS config per compiler:
SCALE=1.0
CFLAGS+=${CFLAGS_${CC}}
CFLAGS_mpiicc=-DSCALE=${SCALE} -std=c99 -Iinclude -qopenmp -O2 #-g -O0 -ggdb -gdwarf-2 -g3
CFLAGS_mpicc=-DSCALE=${SCALE} -std=c99 -Iinclude -fopenmp -O2 #-g -O0 -ggdb -gdwarf-2 -g3
# Hash table library should be included/embedded for simplicity, isn't yet
LDFLAGS+=-Llib
LDLIBS+=-lm -ltlhash
# FFPMEG configuration, this needs to be set by env
# FFMPEG=${HOME}/tools/bin/ffmpeg
all: sph dat2txt cp2txt
sph: sph.c sph_io.o particle_hashtab.o lib/libtlhash.a
dat2txt: dat2txt.c
lib/libtlhash.a:
${MAKE} -C lib
dambreak.mp4: plots
${FFMPEG} ${FFMPEG_FLAGS} dambreak.mp4
plots: $(shell find plot/ -name '*.dat' | sed s/dat/png/g)
plot/%.txt: plot/%.dat
@./cp2txt -f plot/$*.dat > plot/$*.txt
plot/%.png: plot/%.txt
@./convert_dat.sh plot/$*.txt plot/$*.png ${SCALE} 2>&1 > /dev/null
.PHONY: clean plots
clean:
-rm -f sph dat2txt cp2txt *.o