-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
103 lines (84 loc) · 3.89 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
all: dbmon dvpn gencert hostmon mkgraph mkhosts rtmon show-key-id show-key-id-hex
clean:
rm -f client.ini
rm -f client.key
rm -f client2.ini
rm -f client2.key
rm -f dbmon
rm -f dvpn
rm -f gencert
rm -f graph.dot
rm -f graph.dot.new
rm -f graph.png
rm -f graph.png.new
rm -f hostmon
rm -f mkgraph
rm -f mkhosts
rm -f rtmon
rm -f server.ini
rm -f server.key
rm -f server-role.key
rm -f show-key-id
rm -f show-key-id-hex
install: dvpn
install -m 0755 dvpn /usr/bin
install -m 0644 dvpn.service /lib/systemd/system
dvpn: adj_rib_in.c adj_rib_in.h conf.c conf.h confdiff.c confdiff.h dbmon.c dgp_connect.c dgp_connect.h dgp_listen.c dgp_listen.h dgp_reader.c dgp_reader.h dgp_writer.c dgp_writer.h dvpn.c gencert.c hostmon.c itf.c itf.h iv_getaddrinfo.c iv_getaddrinfo.h loc_rib.c loc_rib.h loc_rib_print.c loc_rib_print.h lsa.c lsa.h lsa_deserialise.c lsa_deserialise.h lsa_diff.c lsa_diff.h lsa_path.c lsa_path.h lsa_peer.c lsa_peer.h lsa_print.c lsa_print.h lsa_serialise.c lsa_serialise.h lsa_type.h main.c mkgraph.c mkhosts.c rib_listener.h rib_listener_debug.c rib_listener_debug.h rib_listener_to_loc.c rib_listener_to_loc.h rt_builder.c rt_builder.h rtmon.c show-key-id.c tconn.c tconn.h tconn_connect.c tconn_connect.h tconn_connect_one.c tconn_connect_one.h tconn_listen.c tconn_listen.h tun.c tun.h util.c util.h x509.c x509.h
gcc -Wall -g -o dvpn adj_rib_in.c conf.c confdiff.c dbmon.c dgp_connect.c dgp_listen.c dgp_reader.c dgp_writer.c dvpn.c gencert.c hostmon.c itf.c iv_getaddrinfo.c loc_rib.c loc_rib_print.c lsa.c lsa_deserialise.c lsa_diff.c lsa_path.c lsa_peer.c lsa_print.c lsa_serialise.c main.c mkgraph.c mkhosts.c rib_listener_debug.c rib_listener_to_loc.c rt_builder.c rtmon.c show-key-id.c tconn.c tconn_connect.c tconn_connect_one.c tconn_listen.c tun.c util.c x509.c -lgnutls -lini_config -livykis -lnettle -pthread
dbmon: dvpn
ln -sf dvpn dbmon
gencert: dvpn
ln -sf dvpn gencert
hostmon: dvpn
ln -sf dvpn hostmon
mkgraph: dvpn
ln -sf dvpn mkgraph
mkhosts: dvpn
ln -sf dvpn mkhosts
rtmon: dvpn
ln -sf dvpn rtmon
show-key-id: dvpn
ln -sf dvpn show-key-id
show-key-id-hex: dvpn
ln -sf dvpn show-key-id-hex
test: client.ini client.key client2.ini client2.key dvpn server.ini server.key server-role.key
client.ini: server-role.key dvpn
@echo PrivateKey= > client.ini
@echo RoleKey=client.key >> client.ini
@echo NodeName=client >> client.ini
@echo >> client.ini
@echo [server] >> client.ini
@echo Connect=localhost:19275 >> client.ini
@echo PeerFingerprint=`./dvpn --show-key-id-hex server-role.key` >> client.ini
@echo PeerType=peer >> client.ini
client.key:
certtool --generate-privkey --rsa --sec-param=high --outfile client.key
client2.ini: server-role.key dvpn
@echo PrivateKey= > client2.ini
@echo RoleKey=client2.key >> client2.ini
@echo NodeName=client2 >> client2.ini
@echo >> client2.ini
@echo [server] >> client2.ini
@echo Connect=localhost:19275 >> client2.ini
@echo PeerFingerprint=`./dvpn --show-key-id-hex server-role.key` >> client2.ini
@echo PeerType=peer >> client2.ini
client2.key:
certtool --generate-privkey --rsa --sec-param=high --outfile client2.key
server.ini: client.key client2.key dvpn
@echo PrivateKey=server.key > server.ini
@echo RoleKey=server-role.key >> server.ini
@echo NodeName=server >> server.ini
@echo >> server.ini
@echo [client] >> server.ini
@echo Listen=0.0.0.0:19275 >> server.ini
@echo PeerFingerprint=`./dvpn --show-key-id-hex client.key` >> server.ini
@echo PeerType=peer >> server.ini
@echo >> server.ini
@echo [client2] >> server.ini
@echo Listen=0.0.0.0:19275 >> server.ini
@echo PeerFingerprint=`./dvpn --show-key-id-hex client2.key` >> server.ini
@echo PeerType=peer >> server.ini
server.key:
certtool --generate-privkey --rsa --sec-param=high --outfile server.key
server-role.key:
certtool --generate-privkey --rsa --sec-param=high --outfile server-role.key