-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
69 lines (53 loc) · 1.88 KB
/
Makefile
File metadata and controls
69 lines (53 loc) · 1.88 KB
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
# Historical upstream base
UPSTREAM_BASE = 20090913
# Current recovery-line product version
TNTPSX_VERSION = 0.1.0
# Legacy compatibility alias
TUNTAP_VERSION = $(UPSTREAM_BASE)
# BASE install directory
BASE=
all: tap.kext tun.kext
build: all
installhdrs:
@true
installsrc:
@true
pkg: all
/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker \
-d pkg/tuntap.pmdoc -o tntpsx_$(TNTPSX_VERSION).pkg -v
tar czf tntpsx_$(TNTPSX_VERSION).tar.gz \
README.installer README.md tntpsx_$(TNTPSX_VERSION).pkg
# Install targets
# They are provided for the gentoo ebuild, but should work just fine for other people as well.
install_kext: tap.kext tun.kext
mkdir -p ${BASE}/Library/Extensions
cp -pR tap.kext ${BASE}/Library/Extensions/
chown -R root:wheel ${BASE}/Library/Extensions/tap.kext
cp -pR tun.kext ${BASE}/Library/Extensions/
chown -R root:wheel ${BASE}/Library/Extensions/tun.kext
install_scripts:
mkdir -p ${BASE}/Library/StartupItems
cp -pR startup_item/tap ${BASE}/Library/StartupItems/
chown -R root:wheel ${BASE}/Library/StartupItems/tap
cp -pR startup_item/tun ${BASE}/Library/StartupItems/
chown -R root:wheel ${BASE}/Library/StartupItems/tun
install: install_kext install_scripts
tarball: clean
touch tuntap_$(TUNTAP_VERSION)_src.tar.gz
tar czf tuntap_$(TUNTAP_VERSION)_src.tar.gz \
-C .. \
--exclude "tuntap/tuntap_$(TUNTAP_VERSION)_src.tar.gz" \
--exclude "tuntap/tuntap_$(TUNTAP_VERSION).tar.gz" \
--exclude "tuntap/tuntap_$(TUNTAP_VERSION).pkg" \
--exclude "*/.*" \
tuntap
clean:
cd src/tap && make -f Makefile clean
cd src/tun && make -f Makefile clean
-rm -rf tuntap_$(TUNTAP_VERSION).pkg
-rm -f tuntap_$(TUNTAP_VERSION).tar.gz
-rm -f tuntap_$(TUNTAP_VERSION)_src.tar.gz
tap.kext:
cd src/tap && make TUNTAP_VERSION=$(TUNTAP_VERSION) -f Makefile all
tun.kext:
cd src/tun && make TUNTAP_VERSION=$(TUNTAP_VERSION) -f Makefile all