From d94d4bafbb43699d323d6f6e3e404000b3f0a7b4 Mon Sep 17 00:00:00 2001 From: Daniel Mierswa Date: Sun, 15 Feb 2009 14:22:50 +0200 Subject: [PATCH] Improved 'make install' (use BINDIR/LIBDIR, install shared objects) --- 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 028af4df5..bd1c160cd 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 37d649c52..cffba620d 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 37d649c52..cffba620d 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 37d649c52..cffba620d 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 37d649c52..cffba620d 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 2fcda6a64..d9449a28d 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 *.so *.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 37d649c52..cffba620d 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 37d649c52..cffba620d 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 37d649c52..cffba620d 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 37d649c52..cffba620d 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 37d649c52..cffba620d 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 37d649c52..cffba620d 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 37d649c52..cffba620d 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 37d649c52..cffba620d 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 37d649c52..cffba620d 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 d4ad42473..47d8489bf 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