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]
This commit is contained in:
parent
79ec5264ed
commit
466940c55e
2 changed files with 11 additions and 11 deletions
|
@ -605,11 +605,11 @@ install: all
|
||||||
BCHECK=../src/drivers/build.hostapd
|
BCHECK=../src/drivers/build.hostapd
|
||||||
|
|
||||||
hostapd: $(BCHECK) $(OBJS)
|
hostapd: $(BCHECK) $(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
|
OBJS_c = hostapd_cli.o ../src/common/wpa_ctrl.o ../src/utils/os_$(CONFIG_OS).o
|
||||||
hostapd_cli: $(OBJS_c)
|
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 $(SHA1OBJS) ../src/crypto/rc4.o ../src/crypto/md5.o
|
NOBJS = nt_password_hash.o ../src/crypto/ms_funcs.o $(SHA1OBJS) ../src/crypto/rc4.o ../src/crypto/md5.o
|
||||||
ifdef CONFIG_INTERNAL_MD5
|
ifdef CONFIG_INTERNAL_MD5
|
||||||
|
@ -628,10 +628,10 @@ HOBJS += ../src/crypto/aes-internal-enc.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
nt_password_hash: $(NOBJS)
|
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)
|
hlr_auc_gw: $(HOBJS)
|
||||||
$(CC) -o hlr_auc_gw $(HOBJS) $(LIBS_h)
|
$(CC) $(LDFLAGS) -o hlr_auc_gw $(HOBJS) $(LIBS_h)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(MAKE) -C ../src clean
|
$(MAKE) -C ../src clean
|
||||||
|
@ -670,7 +670,7 @@ TEST_SRC_MILENAGE = ../src/hlr_auc_gw/milenage.c ../src/crypto/aes-internal.c ..
|
||||||
../src/crypto/aes-wrap.c \
|
../src/crypto/aes-wrap.c \
|
||||||
../src/utils/common.c ../src/utils/wpa_debug.o ../src/utils/os_$(CONFIG_OS).c
|
../src/utils/common.c ../src/utils/wpa_debug.o ../src/utils/os_$(CONFIG_OS).c
|
||||||
test-milenage: $(TEST_SRC_MILENAGE)
|
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. \
|
-DTEST_MAIN_MILENAGE -I. \
|
||||||
-I../src/crypto -I../src/utils
|
-I../src/crypto -I../src/utils
|
||||||
./test-milenage
|
./test-milenage
|
||||||
|
|
|
@ -1135,27 +1135,27 @@ win_if_list: win_if_list.c
|
||||||
$(LDO) $(LDFLAGS) -o $@ win_if_list.c $(CFLAGS) $(LIBS_w)
|
$(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
|
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
|
-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
|
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
|
-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
|
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
|
-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
|
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
|
-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
|
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
|
-Deap_peer_ikev2_register=eap_peer_method_dynamic_init
|
||||||
|
|
||||||
%.so: %.c
|
%.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
|
-D$(*F:eap_%=eap_peer_%)_register=eap_peer_method_dynamic_init
|
||||||
|
|
||||||
Q=@
|
Q=@
|
||||||
|
|
Loading…
Reference in a new issue