[PATCH] use BINDIR and LIBDIR, also install shared objects

Daniel Mierswa impulze at impulze.org
Thu Feb 5 20:51:05 EST 2009


---
 src/Makefile            |    3 +++
 src/common/Makefile     |    3 +++
 src/crypto/Makefile     |    3 +++
 src/drivers/Makefile    |    3 +++
 src/eap_common/Makefile |    3 +++
 src/eap_peer/Makefile   |    6 ++++++
 src/eap_server/Makefile |    3 +++
 src/eapol_supp/Makefile |    3 +++
 src/hlr_auc_gw/Makefile |    3 +++
 src/l2_packet/Makefile  |    3 +++
 src/radius/Makefile     |    3 +++
 src/rsn_supp/Makefile   |    3 +++
 src/tls/Makefile        |    3 +++
 src/utils/Makefile      |    3 +++
 src/wps/Makefile        |    3 +++
 wpa_supplicant/Makefile |    8 ++++++--
 16 files changed, 54 insertions(+), 2 deletions(-)

diff --git a/src/Makefile b/src/Makefile
index 028af4d..bd1c160 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -6,3 +6,6 @@ all:
 clean:
 	for d in $(SUBDIRS); do [ -d $$d ] && $(MAKE) -C $$d clean; done
 	rm -f *~
+
+install:
+	for d in $(SUBDIRS); do [ -d $$d ] && $(MAKE) -C $$d install; done
diff --git a/src/common/Makefile b/src/common/Makefile
index 37d649c..cffba62 100644
--- a/src/common/Makefile
+++ b/src/common/Makefile
@@ -4,3 +4,6 @@ all:
 clean:
 	for d in $(SUBDIRS); do make -C $$d clean; done
 	rm -f *~ *.o *.d
+
+install:
+	@echo Nothing to be made.
diff --git a/src/crypto/Makefile b/src/crypto/Makefile
index 37d649c..cffba62 100644
--- a/src/crypto/Makefile
+++ b/src/crypto/Makefile
@@ -4,3 +4,6 @@ all:
 clean:
 	for d in $(SUBDIRS); do make -C $$d clean; done
 	rm -f *~ *.o *.d
+
+install:
+	@echo Nothing to be made.
diff --git a/src/drivers/Makefile b/src/drivers/Makefile
index 37d649c..cffba62 100644
--- a/src/drivers/Makefile
+++ b/src/drivers/Makefile
@@ -4,3 +4,6 @@ all:
 clean:
 	for d in $(SUBDIRS); do make -C $$d clean; done
 	rm -f *~ *.o *.d
+
+install:
+	@echo Nothing to be made.
diff --git a/src/eap_common/Makefile b/src/eap_common/Makefile
index 37d649c..cffba62 100644
--- a/src/eap_common/Makefile
+++ b/src/eap_common/Makefile
@@ -4,3 +4,6 @@ all:
 clean:
 	for d in $(SUBDIRS); do make -C $$d clean; done
 	rm -f *~ *.o *.d
+
+install:
+	@echo Nothing to be made.
diff --git a/src/eap_peer/Makefile b/src/eap_peer/Makefile
index 37d649c..9cf8757 100644
--- a/src/eap_peer/Makefile
+++ b/src/eap_peer/Makefile
@@ -4,3 +4,9 @@ all:
 clean:
 	for d in $(SUBDIRS); do make -C $$d clean; done
 	rm -f *~ *.o *.d
+
+install:
+	if ls *.so >/dev/null 2>&1; then \
+		install -d $(DESTDIR)$(LIBDIR)/wpa_supplicant && \
+		cp *.so $(DESTDIR)$(LIBDIR)/wpa_supplicant \
+	; fi
diff --git a/src/eap_server/Makefile b/src/eap_server/Makefile
index 37d649c..cffba62 100644
--- a/src/eap_server/Makefile
+++ b/src/eap_server/Makefile
@@ -4,3 +4,6 @@ all:
 clean:
 	for d in $(SUBDIRS); do make -C $$d clean; done
 	rm -f *~ *.o *.d
+
+install:
+	@echo Nothing to be made.
diff --git a/src/eapol_supp/Makefile b/src/eapol_supp/Makefile
index 37d649c..cffba62 100644
--- a/src/eapol_supp/Makefile
+++ b/src/eapol_supp/Makefile
@@ -4,3 +4,6 @@ all:
 clean:
 	for d in $(SUBDIRS); do make -C $$d clean; done
 	rm -f *~ *.o *.d
+
+install:
+	@echo Nothing to be made.
diff --git a/src/hlr_auc_gw/Makefile b/src/hlr_auc_gw/Makefile
index 37d649c..cffba62 100644
--- a/src/hlr_auc_gw/Makefile
+++ b/src/hlr_auc_gw/Makefile
@@ -4,3 +4,6 @@ all:
 clean:
 	for d in $(SUBDIRS); do make -C $$d clean; done
 	rm -f *~ *.o *.d
+
+install:
+	@echo Nothing to be made.
diff --git a/src/l2_packet/Makefile b/src/l2_packet/Makefile
index 37d649c..cffba62 100644
--- a/src/l2_packet/Makefile
+++ b/src/l2_packet/Makefile
@@ -4,3 +4,6 @@ all:
 clean:
 	for d in $(SUBDIRS); do make -C $$d clean; done
 	rm -f *~ *.o *.d
+
+install:
+	@echo Nothing to be made.
diff --git a/src/radius/Makefile b/src/radius/Makefile
index 37d649c..cffba62 100644
--- a/src/radius/Makefile
+++ b/src/radius/Makefile
@@ -4,3 +4,6 @@ all:
 clean:
 	for d in $(SUBDIRS); do make -C $$d clean; done
 	rm -f *~ *.o *.d
+
+install:
+	@echo Nothing to be made.
diff --git a/src/rsn_supp/Makefile b/src/rsn_supp/Makefile
index 37d649c..cffba62 100644
--- a/src/rsn_supp/Makefile
+++ b/src/rsn_supp/Makefile
@@ -4,3 +4,6 @@ all:
 clean:
 	for d in $(SUBDIRS); do make -C $$d clean; done
 	rm -f *~ *.o *.d
+
+install:
+	@echo Nothing to be made.
diff --git a/src/tls/Makefile b/src/tls/Makefile
index 37d649c..cffba62 100644
--- a/src/tls/Makefile
+++ b/src/tls/Makefile
@@ -4,3 +4,6 @@ all:
 clean:
 	for d in $(SUBDIRS); do make -C $$d clean; done
 	rm -f *~ *.o *.d
+
+install:
+	@echo Nothing to be made.
diff --git a/src/utils/Makefile b/src/utils/Makefile
index 37d649c..cffba62 100644
--- a/src/utils/Makefile
+++ b/src/utils/Makefile
@@ -4,3 +4,6 @@ all:
 clean:
 	for d in $(SUBDIRS); do make -C $$d clean; done
 	rm -f *~ *.o *.d
+
+install:
+	@echo Nothing to be made.
diff --git a/src/wps/Makefile b/src/wps/Makefile
index 37d649c..cffba62 100644
--- a/src/wps/Makefile
+++ b/src/wps/Makefile
@@ -4,3 +4,6 @@ all:
 clean:
 	for d in $(SUBDIRS); do make -C $$d clean; done
 	rm -f *~ *.o *.d
+
+install:
+	@echo Nothing to be made.
diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
index 8694057..d3b379f 100644
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -6,6 +6,9 @@ ifndef CFLAGS
 CFLAGS = -MMD -O2 -Wall -g
 endif
 
+export LIBDIR ?= /usr/local/lib/
+export BINDIR ?= /usr/local/sbin/
+
 CFLAGS += -I../src
 CFLAGS += -I../src/crypto
 CFLAGS += -I../src/utils
@@ -35,8 +38,9 @@ mkconfig:
 	echo CONFIG_WIRELESS_EXTENSION=y >> .config
 
 install: all
-	mkdir -p $(DESTDIR)/usr/local/sbin/
-	for i in $(ALL); do cp $$i $(DESTDIR)/usr/local/sbin/$$i; done
+	mkdir -p $(DESTDIR)$(BINDIR)
+	for i in $(ALL); do cp $$i $(DESTDIR)$(BINDIR)/$$i; done
+	$(MAKE) -C ../src install
 
 OBJS = config.o
 OBJS += ../src/utils/common.o
-- 
1.6.1.2



--------------040004070208090807060607--


More information about the HostAP mailing list