aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPrashanth Bhatta <bhattap@codeaurora.org>2013-09-06 10:05:40 -0700
committerPrashanth Bhatta <bhattap@codeaurora.org>2013-10-14 16:28:19 -0700
commit280a501f0925c6d72a969acd0f80966b66d5edb6 (patch)
tree8dc1a8be2ac421306648d392801b7524db5fb155
parent48119a1eaaa1798aef056c7935ede5531745dd25 (diff)
downloadandroid_external_wpa_supplicant_8-280a501f0925c6d72a969acd0f80966b66d5edb6.tar.gz
android_external_wpa_supplicant_8-280a501f0925c6d72a969acd0f80966b66d5edb6.tar.bz2
android_external_wpa_supplicant_8-280a501f0925c6d72a969acd0f80966b66d5edb6.zip
hostapd: Make install path configurable
Makefile always installs to /usr/local/sbin and on some platforms, /usr/local/sbin 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/sbin. Change-Id: I9b5c460e62778159491209edc357f8f9888fd653
-rw-r--r--hostapd/Makefile9
1 files changed, 6 insertions, 3 deletions
diff --git a/hostapd/Makefile b/hostapd/Makefile
index 8404e0cb..6e422a9e 100644
--- a/hostapd/Makefile
+++ b/hostapd/Makefile
@@ -6,6 +6,8 @@ ifndef CFLAGS
CFLAGS = -MMD -O2 -Wall -g
endif
+export BINDIR ?= /usr/local/sbin/
+
CFLAGS += -I../src
CFLAGS += -I../src/utils
@@ -848,9 +850,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 \