forked from bigbangbangs/hostapd-radius-eap-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (32 loc) · 1.06 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
TAG := hostap_2_10
SRC := hostap
HOSTAPD := $(SRC)/hostapd/
WPA_SUPP := $(SRC)/wpa_supplicant/
CERTKEY := mysecretkey
DESTDIR := $(PWD)/bin/
all: sources hostapd eapol_test
sources:
test -d $(SRC) || git clone git://w1.fi/hostap.git $(SRC)
git -C $(SRC) reset --hard
git -C $(SRC) checkout $(TAG)
hostapd:
ln -sf $(PWD)/build.config $(HOSTAPD).config
cd $(HOSTAPD) && make
eapol_test:
ln -sf $(PWD)/build.config $(WPA_SUPP).config
cd $(WPA_SUPP) && make eapol_test
certificates:
mkdir -p $(DESTDIR)
cp -r utils/certs $(DESTDIR)certs
sed -i "s/{PASSWORD}/$(CERTKEY)/g" $(DESTDIR)certs/*.cnf
cd $(DESTDIR)certs/ && make
install:
mkdir -p $(DESTDIR)
install -Dm600 hostapd.conf $(DESTDIR)
sed -i "s/{PASSWORD}/$(CERTKEY)/g" $(DESTDIR)hostapd.conf
sed -i "s#{PATH}#$(DESTDIR)#g" $(DESTDIR)hostapd.conf
install -Dm755 $(HOSTAPD)hostapd $(DESTDIR)hostapd
install -Dm755 $(WPA_SUPP)eapol_test $(DESTDIR)eapol_test
install -Dm600 eap_users $(DESTDIR)eap_users
install -Dm600 clients $(DESTDIR)clients
install -Dm600 eapol_test.conf $(DESTDIR)eapol_test.conf