aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPrashanth Bhatta <bhattap@codeaurora.org>2013-09-06 10:05:40 -0700
committerSteve Kondik <shade@chemlab.org>2014-06-12 14:07:29 -0700
commitdb29c4a8b96ade2fabdbe96f3efb82b099c40490 (patch)
treeaa916abf5ffaf6bb6e1a4b2a8942183838abc3de
parentee538890b73cdc29e1c7564f1391c536697976f7 (diff)
downloadandroid_external_wpa_supplicant_8-db29c4a8b96ade2fabdbe96f3efb82b099c40490.tar.gz
android_external_wpa_supplicant_8-db29c4a8b96ade2fabdbe96f3efb82b099c40490.tar.bz2
android_external_wpa_supplicant_8-db29c4a8b96ade2fabdbe96f3efb82b099c40490.zip
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. Modified 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. Change-Id: I9b5c460e62778159491209edc357f8f9888fd653
-rw-r--r--hostapd/Makefile9
1 files changed, 6 insertions, 3 deletions
diff --git a/hostapd/Makefile b/hostapd/Makefile
index fda4e4e3..a559bab6 100644
--- a/hostapd/Makefile
+++ b/hostapd/Makefile
@@ -6,6 +6,8 @@ ifndef CFLAGS
CFLAGS = -MMD -O2 -Wall -g
endif
+export BINDIR ?= /usr/local/bin/
+
CFLAGS += -I../src
CFLAGS += -I../src/utils
@@ -865,9 +867,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 \