~mht/cra

ref: f53bbcd49cbee65e0810cdee1eddbd785c5ced4c cra/Makefile -rw-r--r-- 1.3 KiB
f53bbcd4 — Martin Hafskjold Thoresen Move code to top level 1 year, 8 days ago
                                                                                
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
POINT_FILES=$(shell find data -name "*.points")

help:
	echo $(POINT_FILES)

# These files contains the a triangulation. Point and face
# info is in the file, edge info is implicit in the face info.
data/%.tri: data/%.points triangulate2
	./triangulate2 < $^ > $@

# Cargo eh
target/release/cra: src/main.rs src/output.rs src/persistence.rs
	cargo build --release

# Output from the reduction algorithm
output/.%: data/%.tri target/release/cra
	-mkdir -p output/$*
	env RUST_BACKTRACE=1 target/release/cra -t="-" < $< \
		--graphviz=output/$*/graph.dot \
		--diagram=output/$*/persistence.pdf \
		--svg=output/$*/rendering.svg \
		--tex-table=output/$*/perf-stats.tex \
		--stats=output/$*/stats \
		--points="-"
	convert -size 800x800 output/$*/rendering.svg output/$*/rendering.png
	touch $@

# Triangulation exec
triangulate2: triangulate2.cpp
	clang++ -O2 -Wall triangulate2.cpp -DCGAL_HEADER_ONLY -lgmp -o triangulate2  

# Complete .pdf with all graphs in it for all data sets.
listings.pdf: listings.tex all-pdfs
	latex-mk --pdflatex listings.tex

# Make all folders in `output` for each `.point` file.
all-pdfs: | $(foreach F,$(POINT_FILES),$(patsubst data/%.points,output/.%,$(F)))

.PHONY:
clean:
	rm -fr *.tri *.svg triangulate2

.PRECIOUS: data/%.out data/%.tri output/%/rendering.svg