summaryrefslogtreecommitdiff
path: root/Makefile
blob: 6fc51b3c332ae0123f2596ef8c869315f9c95d65 (plain)
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
PPPD := $(shell /usr/sbin/pppd --version 2>&1 | grep version)
PPPD := $(patsubst pppd,,$(PPPD))
PPPD := $(patsubst version,,$(PPPD))
PPPD := $(strip $(PPPD))

default: module plugin pptpd
client: module plugin
server: default

module:
	echo Building kernel module
	(cd kernel/driver; make )

plugin: pppd_plugin/Makefile
	echo Building pppd plugin
	(cd pppd_plugin; make)

pptpd: pptpd-1.3.3/Makefile
	echo Building pptpd
	(cd pptpd-1.3.3; make)

pppd_plugin/Makefile: pptpd-1.3.3/Makefile
	(cd pppd_plugin; ./configure)

pptpd-1.3.3/Makefile:
	(cd pptpd-1.3.3; ./configure)


module_install: module
	(cd kernel/driver; make install)

plugin_install: plugin
	install -m 0644 pppd_plugin/src/.libs/pptp.so.0.0.0 /usr/lib/pppd/$(PPPD)/pptp.so

client_install: module_install plugin_install

server_install: server module_install plugin_install
	(cd pptpd-1.3.3; make install)

clean:
	(cd kernel/driver; make clean)
	(cd pppd_plugin; make clean)
	(cd pptpd-1.3.3; make clean)
distclean:
	(cd kernel/driver; make clean)
	(cd pppd_plugin; make distclean)
	(cd pptpd-1.3.3; make distclean)