aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/Makefile
diff options
context:
space:
mode:
authorPrashanth Bhatta <bhattap@qca.qualcomm.com>2013-09-06 17:05:40 (GMT)
committerJouni Malinen <j@w1.fi>2014-12-19 10:32:50 (GMT)
commit9108ea09f2e00c85617e032d329087f3cbac9f04 (patch)
tree127164475b4dcd2d1a4d1c1395245cf0a435c542 /hostapd/Makefile
parent7c5c1ba7b4f9d0b18e03864c82d0a6d5b0b94608 (diff)
downloadhostap-9108ea09f2e00c85617e032d329087f3cbac9f04.zip
hostap-9108ea09f2e00c85617e032d329087f3cbac9f04.tar.gz
hostap-9108ea09f2e00c85617e032d329087f3cbac9f04.tar.bz2
hostapd: Make install path configurable
Makefile always installs to /usr/local/bin and on some platforms, /usr/local/bin is not in default search path. Modify the Makefile such that bin path can be configurable so that build system can pass appropriate path for installation. If bin path is not specified then by default binaries are installed in /usr/local/bin. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'hostapd/Makefile')
-rw-r--r--hostapd/Makefile9
1 files changed, 6 insertions, 3 deletions
diff --git a/hostapd/Makefile b/hostapd/Makefile
index dea4c15..d1143bb 100644
--- a/hostapd/Makefile
+++ b/hostapd/Makefile
@@ -9,6 +9,8 @@ endif
CFLAGS += -I$(abspath ../src)
CFLAGS += -I$(abspath ../src/utils)
+export BINDIR ?= /usr/local/bin/
+
# Uncomment following line and set the path to your kernel tree include
# directory if your C library does not include all header files.
# CFLAGS += -DUSE_KERNEL_HEADERS -I/usr/src/linux/include
@@ -931,9 +933,10 @@ verify_config:
exit 1; \
fi
-install: all
- mkdir -p $(DESTDIR)/usr/local/bin
- for i in $(ALL); do cp -f $$i $(DESTDIR)/usr/local/bin/$$i; done
+$(DESTDIR)$(BINDIR)/%: %
+ install -D $(<) $(@)
+
+install: $(addprefix $(DESTDIR)$(BINDIR)/,$(ALL))
../src/drivers/build.hostapd:
@if [ -f ../src/drivers/build.wpa_supplicant ]; then \