-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
49 lines (37 loc) · 1.03 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
CC = g++
CFLAGS = -Wall -Wextra
JGRAPH_LOCAL = /Users/williamwinslade/Documents/jgraph/jgraph
JGRAPH_HYDRA = /home/jplank/bin/LINUX-X86_64/jgraph
JGRAPH = $(JGRAPH_HYDRA)
all: netgraph_to_jgr
netgraph_to_jgr:
$(CC) $(CFLAGS) -o wnet netgraph_to_jgr.cpp
examples: netgraph_to_jgr output_dir ex1 ex2 ex3 ex4 ex5
@echo ''
@echo 'Examples compiled in PDF form in ./output/'
output_dir:
mkdir -p output
ex1:
./wnet examples/1.txt output/1.jgr
$(JGRAPH) -P output/1.jgr > output/1.ps
ps2pdf output/1.ps output/1.pdf
ex2:
./wnet examples/2.txt output/2.jgr
$(JGRAPH) -P output/2.jgr > output/2.ps
ps2pdf output/2.ps output/2.pdf
ex3:
./wnet examples/3.txt output/3.jgr
$(JGRAPH) -P output/3.jgr > output/3.ps
ps2pdf output/3.ps output/3.pdf
ex4:
./wnet examples/4.txt output/4.jgr
$(JGRAPH) -P output/4.jgr > output/4.ps
ps2pdf output/4.ps output/4.pdf
ex5:
./wnet examples/5.txt output/5.jgr
$(JGRAPH) -P output/5.jgr > output/5.ps
ps2pdf output/5.ps output/5.pdf
clean: output_dir
rm -f wnet
rm -f output/*
rmdir output