aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjarke Istrup Pedersen <gurligebis@gentoo.org>2009-08-16 06:47:56 (GMT)
committerJouni Malinen <j@w1.fi>2010-02-08 18:54:26 (GMT)
commitd36bac2b867f3276842ea049bddda6604856e1fb (patch)
treea1bc137e53e6ab65e2dd4ad1634ed7aa82a24250
parent1fd851e121eb4bd6537cb8c6a018c3b81cddb0f7 (diff)
downloadhostap-06-d36bac2b867f3276842ea049bddda6604856e1fb.zip
hostap-06-d36bac2b867f3276842ea049bddda6604856e1fb.tar.gz
hostap-06-d36bac2b867f3276842ea049bddda6604856e1fb.tar.bz2
Use LDFLAGS in all linker commands
When building hostapd and wpa_supplicant, the build system does not respect the LDFLAGS selected in the environment in some cases. [Bug 311] (cherry picked from commit 466940c55e101fd9d8c4b813361d2d90c11006ee)
-rw-r--r--hostapd/Makefile10
-rw-r--r--wpa_supplicant/Makefile12
2 files changed, 11 insertions, 11 deletions
diff --git a/hostapd/Makefile b/hostapd/Makefile
index 3b3d7fe..291d96a 100644
--- a/hostapd/Makefile
+++ b/hostapd/Makefile
@@ -580,11 +580,11 @@ install: all
for i in $(ALL); do cp $$i /usr/local/bin/$$i; done
hostapd: $(OBJS)
- $(CC) -o hostapd $(OBJS) $(LIBS)
+ $(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS)
OBJS_c = hostapd_cli.o ../src/common/wpa_ctrl.o ../src/utils/os_$(CONFIG_OS).o
hostapd_cli: $(OBJS_c)
- $(CC) -o hostapd_cli $(OBJS_c)
+ $(CC) $(LDFLAGS) -o hostapd_cli $(OBJS_c)
NOBJS = nt_password_hash.o ../src/crypto/ms_funcs.o ../src/crypto/sha1.o ../src/crypto/rc4.o ../src/crypto/md5.o
NOBJS += ../src/crypto/crypto_openssl.o ../src/utils/os_$(CONFIG_OS).o
@@ -593,10 +593,10 @@ LIBS_n += -lcrypto
endif
nt_password_hash: $(NOBJS)
- $(CC) -o nt_password_hash $(NOBJS) $(LIBS_n)
+ $(CC) $(LDFLAGS) -o nt_password_hash $(NOBJS) $(LIBS_n)
hlr_auc_gw: $(HOBJS)
- $(CC) -o hlr_auc_gw $(HOBJS) $(LIBS_h)
+ $(CC) $(LDFLAGS) -o hlr_auc_gw $(HOBJS) $(LIBS_h)
clean:
$(MAKE) -C ../src clean
@@ -626,7 +626,7 @@ clean-docs:
TEST_SRC_MILENAGE = ../src/hlr_auc_gw/milenage.c ../src/crypto/aes_wrap.c ../src/crypto/aes.c ../src/utils/common.c ../src/utils/wpa_debug.o ../src/utils/os_$(CONFIG_OS).c
test-milenage: $(TEST_SRC_MILENAGE)
- $(CC) -o test-milenage -Wall -Werror $(TEST_SRC_MILENAGE) \
+ $(CC) $(LDFLAGS) -o test-milenage -Wall -Werror $(TEST_SRC_MILENAGE) \
-DTEST_MAIN_MILENAGE -I. -DINTERNAL_AES \
-I../src/crypto -I../src/utils
./test-milenage
diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
index 5a88fb3..abf5aa0 100644
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -1129,27 +1129,27 @@ win_if_list: win_if_list.c
$(LDO) $(LDFLAGS) -o $@ win_if_list.c $(CFLAGS) $(LIBS_w)
eap_psk.so: ../src/eap_peer/eap_psk.c ../src/eap_common/eap_psk_common.c
- $(CC) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \
+ $(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \
-Deap_peer_psk_register=eap_peer_method_dynamic_init
eap_pax.so: ../src/eap_peer/eap_pax.c ../src/eap_common/eap_pax_common.c
- $(CC) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \
+ $(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \
-Deap_peer_pax_register=eap_peer_method_dynamic_init
eap_sake.so: ../src/eap_peer/eap_sake.c ../src/eap_common/eap_sake_common.c
- $(CC) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \
+ $(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \
-Deap_peer_sake_register=eap_peer_method_dynamic_init
eap_wsc.so: ../src/eap_peer/eap_wsc.c ../src/eap_common/eap_wsc_common.c ../src/wps/wps.c
- $(CC) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \
+ $(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \
-Deap_peer_wsc_register=eap_peer_method_dynamic_init
eap_ikev2.so: ../src/eap_peer/eap_ikev2.c ../src/eap_peer/ikev2.c ../src/eap_common/eap_ikev2_common.o ../src/eap_common/ikev2_common.c
- $(CC) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \
+ $(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \
-Deap_peer_ikev2_register=eap_peer_method_dynamic_init
%.so: %.c
- $(CC) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $< \
+ $(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $< \
-D$(*F:eap_%=eap_peer_%)_register=eap_peer_method_dynamic_init
Q=@