build: Put object files into build/ folder
Instead of building in the source tree, put most object files into the build/ folder at the root, and put each thing that's being built into a separate folder. This then allows us to build hostapd and wpa_supplicant (or other combinations) without "make clean" inbetween. For the tests keep the objects in place for now (and to do that, add the build rule) so that we don't have to rewrite all of that with $(call BUILDOBJS,...) which is just noise there. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
0464d5d5d6
commit
722138cd25
26 changed files with 136 additions and 82 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -34,3 +34,4 @@ wlantest/wlantest
|
||||||
wlantest/wlantest_cli
|
wlantest/wlantest_cli
|
||||||
**/parallel-vm.log
|
**/parallel-vm.log
|
||||||
tags
|
tags
|
||||||
|
build/
|
||||||
|
|
|
@ -7,9 +7,9 @@ CFLAGS += -I../src
|
||||||
CFLAGS += -I../src/utils
|
CFLAGS += -I../src/utils
|
||||||
|
|
||||||
|
|
||||||
OBJS_both += ../src/utils/libutils.a
|
EAP_LIBS += ../src/utils/libutils.a
|
||||||
OBJS_both += ../src/crypto/libcrypto.a
|
EAP_LIBS += ../src/crypto/libcrypto.a
|
||||||
OBJS_both += ../src/tls/libtls.a
|
EAP_LIBS += ../src/tls/libtls.a
|
||||||
|
|
||||||
OBJS_both += ../src/eap_common/eap_peap_common.o
|
OBJS_both += ../src/eap_common/eap_peap_common.o
|
||||||
OBJS_both += ../src/eap_common/eap_psk_common.o
|
OBJS_both += ../src/eap_common/eap_psk_common.o
|
||||||
|
@ -83,8 +83,12 @@ CFLAGS += -DEAP_SERVER
|
||||||
|
|
||||||
|
|
||||||
OBJS_lib=$(OBJS_both) $(OBJS_peer) $(OBJS_server)
|
OBJS_lib=$(OBJS_both) $(OBJS_peer) $(OBJS_server)
|
||||||
|
_OBJS_VAR := OBJS_lib
|
||||||
|
include ../src/objs.mk
|
||||||
|
|
||||||
OBJS_ex = eap_example.o eap_example_peer.o eap_example_server.o
|
OBJS_ex = eap_example.o eap_example_peer.o eap_example_server.o
|
||||||
|
_OBJS_VAR := OBJS_ex
|
||||||
|
include ../src/objs.mk
|
||||||
|
|
||||||
|
|
||||||
../src/utils/libutils.a:
|
../src/utils/libutils.a:
|
||||||
|
@ -99,8 +103,8 @@ OBJS_ex = eap_example.o eap_example_peer.o eap_example_server.o
|
||||||
|
|
||||||
ifneq ($(CONFIG_SOLIB), yes)
|
ifneq ($(CONFIG_SOLIB), yes)
|
||||||
LIBEAP = libeap.a
|
LIBEAP = libeap.a
|
||||||
libeap.a: $(OBJS_lib)
|
libeap.a: $(EAP_LIBS) $(OBJS_lib)
|
||||||
$(AR) crT libeap.a $(OBJS_lib)
|
$(AR) crT libeap.a $^
|
||||||
$(RANLIB) libeap.a
|
$(RANLIB) libeap.a
|
||||||
|
|
||||||
else
|
else
|
||||||
|
@ -108,8 +112,8 @@ CFLAGS += -fPIC -DPIC
|
||||||
LDFLAGS += -shared
|
LDFLAGS += -shared
|
||||||
|
|
||||||
LIBEAP = libeap.so
|
LIBEAP = libeap.so
|
||||||
libeap.so: $(OBJS_lib)
|
libeap.so: $(EAP_LIBS) $(OBJS_lib)
|
||||||
$(LDO) $(LDFLAGS) $(OBJS_lib) -o $(LIBEAP)
|
$(LDO) $(LDFLAGS) $^ -o $(LIBEAP)
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -1272,6 +1272,9 @@ install: $(addprefix $(DESTDIR)$(BINDIR)/,$(ALL))
|
||||||
|
|
||||||
BCHECK=../src/drivers/build.hostapd
|
BCHECK=../src/drivers/build.hostapd
|
||||||
|
|
||||||
|
_OBJS_VAR := OBJS
|
||||||
|
include ../src/objs.mk
|
||||||
|
|
||||||
hostapd: $(BCHECK) $(OBJS)
|
hostapd: $(BCHECK) $(OBJS)
|
||||||
$(Q)$(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS)
|
$(Q)$(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS)
|
||||||
@$(E) " LD " $@
|
@$(E) " LD " $@
|
||||||
|
@ -1279,6 +1282,10 @@ hostapd: $(BCHECK) $(OBJS)
|
||||||
ifdef CONFIG_WPA_TRACE
|
ifdef CONFIG_WPA_TRACE
|
||||||
OBJS_c += ../src/utils/trace.o
|
OBJS_c += ../src/utils/trace.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
_OBJS_VAR := OBJS_c
|
||||||
|
include ../src/objs.mk
|
||||||
|
|
||||||
hostapd_cli: $(OBJS_c)
|
hostapd_cli: $(OBJS_c)
|
||||||
$(Q)$(CC) $(LDFLAGS) -o hostapd_cli $(OBJS_c) $(LIBS_c)
|
$(Q)$(CC) $(LDFLAGS) -o hostapd_cli $(OBJS_c) $(LIBS_c)
|
||||||
@$(E) " LD " $@
|
@$(E) " LD " $@
|
||||||
|
@ -1335,6 +1342,13 @@ SOBJS += ../src/crypto/sha256-kdf.o
|
||||||
SOBJS += ../src/crypto/sha384-kdf.o
|
SOBJS += ../src/crypto/sha384-kdf.o
|
||||||
SOBJS += ../src/crypto/sha512-kdf.o
|
SOBJS += ../src/crypto/sha512-kdf.o
|
||||||
|
|
||||||
|
_OBJS_VAR := NOBJS
|
||||||
|
include ../src/objs.mk
|
||||||
|
_OBJS_VAR := HOBJS
|
||||||
|
include ../src/objs.mk
|
||||||
|
_OBJS_VAR := SOBJS
|
||||||
|
include ../src/objs.mk
|
||||||
|
|
||||||
nt_password_hash: $(NOBJS)
|
nt_password_hash: $(NOBJS)
|
||||||
$(Q)$(CC) $(LDFLAGS) -o nt_password_hash $(NOBJS) $(LIBS_n)
|
$(Q)$(CC) $(LDFLAGS) -o nt_password_hash $(NOBJS) $(LIBS_n)
|
||||||
@$(E) " LD " $@
|
@$(E) " LD " $@
|
||||||
|
@ -1347,15 +1361,13 @@ sae_pk_gen: $(SOBJS)
|
||||||
$(Q)$(CC) $(LDFLAGS) -o sae_pk_gen $(SOBJS) $(LIBS_s)
|
$(Q)$(CC) $(LDFLAGS) -o sae_pk_gen $(SOBJS) $(LIBS_s)
|
||||||
@$(E) " LD " $@
|
@$(E) " LD " $@
|
||||||
|
|
||||||
|
.PHONY: lcov-html
|
||||||
lcov-html:
|
lcov-html:
|
||||||
lcov -c -d .. > lcov.info
|
lcov -c -d $(BUILDDIR) > lcov.info
|
||||||
genhtml lcov.info --output-directory lcov-html
|
genhtml lcov.info --output-directory lcov-html
|
||||||
|
|
||||||
clean: common-clean
|
clean: common-clean
|
||||||
rm -f core *~ *.o nt_password_hash hlr_auc_gw
|
rm -f core *~ nt_password_hash hlr_auc_gw
|
||||||
rm -f sae_pk_gen
|
rm -f sae_pk_gen
|
||||||
rm -f *.d *.gcno *.gcda *.gcov
|
|
||||||
rm -f lcov.info
|
rm -f lcov.info
|
||||||
rm -rf lcov-html
|
rm -rf lcov-html
|
||||||
|
|
||||||
-include $(OBJS:%.o=%.d)
|
|
||||||
|
|
|
@ -71,19 +71,11 @@ CFLAGS += -DEAP_TLS_OPENSSL
|
||||||
OBJS += ../../src/crypto/tls_openssl_ocsp.o
|
OBJS += ../../src/crypto/tls_openssl_ocsp.o
|
||||||
LIBS += -lssl -lcrypto
|
LIBS += -lssl -lcrypto
|
||||||
|
|
||||||
|
_OBJS_VAR := OBJS
|
||||||
|
include ../../src/objs.mk
|
||||||
hs20-osu-client: $(OBJS)
|
hs20-osu-client: $(OBJS)
|
||||||
$(Q)$(LDO) $(LDFLAGS) -o hs20-osu-client $(OBJS) $(LIBS)
|
$(Q)$(LDO) $(LDFLAGS) -o hs20-osu-client $(OBJS) $(LIBS)
|
||||||
@$(E) " LD " $@
|
@$(E) " LD " $@
|
||||||
|
|
||||||
clean: common-clean
|
clean: common-clean
|
||||||
rm -f core *~ *.o *.d
|
rm -f core *~
|
||||||
rm -f ../../src/utils/*.o
|
|
||||||
rm -f ../../src/utils/*.d
|
|
||||||
rm -f ../../src/common/*.o
|
|
||||||
rm -f ../../src/common/*.d
|
|
||||||
rm -f ../../src/crypto/*.o
|
|
||||||
rm -f ../../src/crypto/*.d
|
|
||||||
rm -f ../../src/wps/*.o
|
|
||||||
rm -f ../../src/wps/*.d
|
|
||||||
|
|
||||||
-include $(OBJS:%.o=%.d)
|
|
||||||
|
|
|
@ -33,14 +33,10 @@ CFLAGS += $(shell xml2-config --cflags)
|
||||||
LIBS += $(shell xml2-config --libs)
|
LIBS += $(shell xml2-config --libs)
|
||||||
OBJS += ../../src/utils/xml_libxml2.o
|
OBJS += ../../src/utils/xml_libxml2.o
|
||||||
|
|
||||||
|
_OBJS_VAR := OBJS
|
||||||
|
include ../../src/objs.mk
|
||||||
hs20_spp_server: $(OBJS)
|
hs20_spp_server: $(OBJS)
|
||||||
$(LDO) $(LDFLAGS) -o hs20_spp_server $(OBJS) $(LIBS)
|
$(LDO) $(LDFLAGS) -o hs20_spp_server $(OBJS) $(LIBS)
|
||||||
|
|
||||||
clean: common-clean
|
clean: common-clean
|
||||||
rm -f core *~ *.o *.d
|
rm -f core *~
|
||||||
rm -f ../../src/utils/*.o
|
|
||||||
rm -f ../../src/utils/*.d
|
|
||||||
rm -f ../../src/crypto/*.o
|
|
||||||
rm -f ../../src/crypto/*.d
|
|
||||||
|
|
||||||
-include $(OBJS:%.o=%.d)
|
|
||||||
|
|
|
@ -24,10 +24,11 @@ LLIBS = -lrt
|
||||||
|
|
||||||
OBJS_ex = radius_example.o
|
OBJS_ex = radius_example.o
|
||||||
|
|
||||||
|
_OBJS_VAR := OBJS_ex
|
||||||
|
include ../src/objs.mk
|
||||||
|
|
||||||
radius_example: $(OBJS_ex) $(LIBS)
|
radius_example: $(OBJS_ex) $(LIBS)
|
||||||
$(LDO) $(LDFLAGS) -o radius_example $(OBJS_ex) $(LIBS) $(LLIBS)
|
$(LDO) $(LDFLAGS) -o radius_example $(OBJS_ex) $(LIBS) $(LLIBS)
|
||||||
|
|
||||||
clean: common-clean
|
clean: common-clean
|
||||||
rm -f core *~ *.o *.d
|
rm -f core *~ *.o *.d
|
||||||
|
|
||||||
-include $(OBJS:%.o=%.d)
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ LIB_OBJS= \
|
||||||
wps_hostapd.o \
|
wps_hostapd.o \
|
||||||
x_snoop.o
|
x_snoop.o
|
||||||
|
|
||||||
|
_OBJS_VAR := LIB_OBJS
|
||||||
|
include ../objs.mk
|
||||||
libap.a: $(LIB_OBJS)
|
libap.a: $(LIB_OBJS)
|
||||||
$(AR) crT $@ $?
|
$(AR) crT $@ $?
|
||||||
|
|
||||||
-include $(OBJS:%.o=%.d)
|
|
||||||
|
|
|
@ -4,8 +4,13 @@ all: _all
|
||||||
# disable built-in rules
|
# disable built-in rules
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
|
|
||||||
|
# setup some variables
|
||||||
ROOTDIR := $(dir $(lastword $(MAKEFILE_LIST)))
|
ROOTDIR := $(dir $(lastword $(MAKEFILE_LIST)))
|
||||||
ROOTDIR := $(dir $(ROOTDIR:%/=%))
|
ROOTDIR := $(dir $(ROOTDIR:%../src/=%))../
|
||||||
|
BUILDDIR := $(ROOTDIR)build
|
||||||
|
_PROJ := $(abspath $(dir $(firstword $(MAKEFILE_LIST))))
|
||||||
|
ABSROOT := $(abspath $(ROOTDIR))
|
||||||
|
_PROJ := $(_PROJ:$(ABSROOT)/%=%)
|
||||||
|
|
||||||
ifndef CC
|
ifndef CC
|
||||||
CC=gcc
|
CC=gcc
|
||||||
|
@ -26,6 +31,9 @@ endif
|
||||||
ifneq ($(CONFIG_FILE),)
|
ifneq ($(CONFIG_FILE),)
|
||||||
-include $(CONFIG_FILE)
|
-include $(CONFIG_FILE)
|
||||||
|
|
||||||
|
# export for sub-makefiles
|
||||||
|
export CONFIG_CODE_COVERAGE
|
||||||
|
|
||||||
.PHONY: verify_config
|
.PHONY: verify_config
|
||||||
verify_config:
|
verify_config:
|
||||||
@if [ ! -r $(CONFIG_FILE) ]; then \
|
@if [ ! -r $(CONFIG_FILE) ]; then \
|
||||||
|
@ -44,6 +52,10 @@ endif
|
||||||
.PHONY: _all
|
.PHONY: _all
|
||||||
_all: $(VERIFY) $(ALL) $(EXTRA_TARGETS)
|
_all: $(VERIFY) $(ALL) $(EXTRA_TARGETS)
|
||||||
|
|
||||||
|
# continue setup
|
||||||
|
COVSUFFIX := $(if $(CONFIG_CODE_COVERAGE),-cov,)
|
||||||
|
PROJ := $(_PROJ)$(COVSUFFIX)
|
||||||
|
|
||||||
Q=@
|
Q=@
|
||||||
E=echo
|
E=echo
|
||||||
ifeq ($(V), 1)
|
ifeq ($(V), 1)
|
||||||
|
@ -59,17 +71,21 @@ ifeq ($(Q),@)
|
||||||
MAKEFLAGS += --no-print-directory
|
MAKEFLAGS += --no-print-directory
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_CODE_COVERAGE
|
_DIRS := $(BUILDDIR)/$(PROJ)
|
||||||
%.o: %.c
|
.PHONY: _make_dirs
|
||||||
@$(E) " CC " $<
|
_make_dirs:
|
||||||
$(Q)cd $(dir $@); $(CC) -c -o $(notdir $@) $(CFLAGS) $(notdir $<)
|
@mkdir -p $(_DIRS)
|
||||||
else
|
|
||||||
%.o: %.c
|
$(BUILDDIR)/$(PROJ)/src/%.o: $(ROOTDIR)src/%.c | _make_dirs
|
||||||
$(Q)$(CC) -c -o $@ $(CFLAGS) $<
|
$(Q)$(CC) -c -o $@ $(CFLAGS) $<
|
||||||
@$(E) " CC " $<
|
@$(E) " CC " $<
|
||||||
endif
|
$(BUILDDIR)/$(PROJ)/%.o: %.c | _make_dirs
|
||||||
|
$(Q)$(CC) -c -o $@ $(CFLAGS) $<
|
||||||
|
@$(E) " CC " $<
|
||||||
|
|
||||||
|
BUILDOBJ = $(patsubst %,$(BUILDDIR)/$(PROJ)/%,$(patsubst $(ROOTDIR)%,%,$(1)))
|
||||||
|
|
||||||
.PHONY: common-clean
|
.PHONY: common-clean
|
||||||
common-clean:
|
common-clean:
|
||||||
$(Q)$(MAKE) -C $(ROOTDIR)/src clean
|
$(Q)$(MAKE) -C $(ROOTDIR)/src clean
|
||||||
$(Q)rm -f $(ALL)
|
$(Q)rm -rf $(ALL) $(BUILDDIR)/$(PROJ)
|
||||||
|
|
|
@ -19,7 +19,7 @@ LIB_OBJS= \
|
||||||
sae.o \
|
sae.o \
|
||||||
wpa_common.o
|
wpa_common.o
|
||||||
|
|
||||||
|
_OBJS_VAR := LIB_OBJS
|
||||||
|
include ../objs.mk
|
||||||
libcommon.a: $(LIB_OBJS)
|
libcommon.a: $(LIB_OBJS)
|
||||||
$(AR) crT $@ $?
|
$(AR) crT $@ $?
|
||||||
|
|
||||||
-include $(OBJS:%.o=%.d)
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ LIB_OBJS += random.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
_OBJS_VAR := LIB_OBJS
|
||||||
|
include ../objs.mk
|
||||||
libcrypto.a: $(LIB_OBJS)
|
libcrypto.a: $(LIB_OBJS)
|
||||||
$(AR) crT $@ $?
|
$(AR) crT $@ $?
|
||||||
|
|
||||||
-include $(OBJS:%.o=%.d)
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ LIB_OBJS= \
|
||||||
eap_wsc_common.o \
|
eap_wsc_common.o \
|
||||||
ikev2_common.o
|
ikev2_common.o
|
||||||
|
|
||||||
|
_OBJS_VAR := LIB_OBJS
|
||||||
|
include ../objs.mk
|
||||||
libeap_common.a: $(LIB_OBJS)
|
libeap_common.a: $(LIB_OBJS)
|
||||||
$(AR) crT $@ $?
|
$(AR) crT $@ $?
|
||||||
|
|
||||||
-include $(OBJS:%.o=%.d)
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ LIB_OBJS= \
|
||||||
eap.o \
|
eap.o \
|
||||||
eap_methods.o
|
eap_methods.o
|
||||||
|
|
||||||
|
_OBJS_VAR := LIB_OBJS
|
||||||
|
include ../objs.mk
|
||||||
libeap_peer.a: $(LIB_OBJS)
|
libeap_peer.a: $(LIB_OBJS)
|
||||||
$(AR) crT $@ $?
|
$(AR) crT $@ $?
|
||||||
|
|
||||||
-include $(OBJS:%.o=%.d)
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ LIB_OBJS= \
|
||||||
eap_server_identity.o \
|
eap_server_identity.o \
|
||||||
eap_server_methods.o
|
eap_server_methods.o
|
||||||
|
|
||||||
|
_OBJS_VAR := LIB_OBJS
|
||||||
|
include ../objs.mk
|
||||||
libeap_server.a: $(LIB_OBJS)
|
libeap_server.a: $(LIB_OBJS)
|
||||||
$(AR) crT $@ $?
|
$(AR) crT $@ $?
|
||||||
|
|
||||||
-include $(OBJS:%.o=%.d)
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ install:
|
||||||
|
|
||||||
LIB_OBJS = eapol_auth_sm.o eapol_auth_dump.o
|
LIB_OBJS = eapol_auth_sm.o eapol_auth_dump.o
|
||||||
|
|
||||||
|
_OBJS_VAR := LIB_OBJS
|
||||||
|
include ../objs.mk
|
||||||
libeapol_auth.a: $(LIB_OBJS)
|
libeapol_auth.a: $(LIB_OBJS)
|
||||||
$(AR) crT $@ $?
|
$(AR) crT $@ $?
|
||||||
|
|
||||||
-include $(OBJS:%.o=%.d)
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ CFLAGS += -DIEEE8021X_EAPOL
|
||||||
|
|
||||||
LIB_OBJS = eapol_supp_sm.o
|
LIB_OBJS = eapol_supp_sm.o
|
||||||
|
|
||||||
|
_OBJS_VAR := LIB_OBJS
|
||||||
|
include ../objs.mk
|
||||||
libeapol_supp.a: $(LIB_OBJS)
|
libeapol_supp.a: $(LIB_OBJS)
|
||||||
$(AR) crT $@ $?
|
$(AR) crT $@ $?
|
||||||
|
|
||||||
-include $(OBJS:%.o=%.d)
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ install:
|
||||||
|
|
||||||
LIB_OBJS = l2_packet_linux.o
|
LIB_OBJS = l2_packet_linux.o
|
||||||
|
|
||||||
|
_OBJS_VAR := LIB_OBJS
|
||||||
|
include ../objs.mk
|
||||||
libl2_packet.a: $(LIB_OBJS)
|
libl2_packet.a: $(LIB_OBJS)
|
||||||
$(AR) crT $@ $?
|
$(AR) crT $@ $?
|
||||||
|
|
||||||
-include $(OBJS:%.o=%.d)
|
|
||||||
|
|
3
src/objs.mk
Normal file
3
src/objs.mk
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
$(_OBJS_VAR) := $(call BUILDOBJ,$($(_OBJS_VAR)))
|
||||||
|
-include $($(_OBJS_VAR):%.o=%.d)
|
||||||
|
_DIRS += $(dir $($(_OBJS_VAR)))
|
|
@ -21,7 +21,7 @@ LIB_OBJS= \
|
||||||
p2p_sd.o \
|
p2p_sd.o \
|
||||||
p2p_utils.o
|
p2p_utils.o
|
||||||
|
|
||||||
|
_OBJS_VAR := LIB_OBJS
|
||||||
|
include ../objs.mk
|
||||||
libp2p.a: $(LIB_OBJS)
|
libp2p.a: $(LIB_OBJS)
|
||||||
$(AR) crT $@ $?
|
$(AR) crT $@ $?
|
||||||
|
|
||||||
-include $(OBJS:%.o=%.d)
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ LIB_OBJS= \
|
||||||
radius_das.o \
|
radius_das.o \
|
||||||
radius_server.o
|
radius_server.o
|
||||||
|
|
||||||
|
_OBJS_VAR := LIB_OBJS
|
||||||
|
include ../objs.mk
|
||||||
libradius.a: $(LIB_OBJS)
|
libradius.a: $(LIB_OBJS)
|
||||||
$(AR) crT $@ $?
|
$(AR) crT $@ $?
|
||||||
|
|
||||||
-include $(OBJS:%.o=%.d)
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ LIB_OBJS= \
|
||||||
wpa.o \
|
wpa.o \
|
||||||
wpa_ie.o
|
wpa_ie.o
|
||||||
|
|
||||||
|
_OBJS_VAR := LIB_OBJS
|
||||||
|
include ../objs.mk
|
||||||
librsn_supp.a: $(LIB_OBJS)
|
librsn_supp.a: $(LIB_OBJS)
|
||||||
$(AR) crT $@ $?
|
$(AR) crT $@ $?
|
||||||
|
|
||||||
-include $(OBJS:%.o=%.d)
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ LIB_OBJS= \
|
||||||
x509v3.o
|
x509v3.o
|
||||||
|
|
||||||
|
|
||||||
|
_OBJS_VAR := LIB_OBJS
|
||||||
|
include ../objs.mk
|
||||||
libtls.a: $(LIB_OBJS)
|
libtls.a: $(LIB_OBJS)
|
||||||
$(AR) crT $@ $?
|
$(AR) crT $@ $?
|
||||||
|
|
||||||
-include $(OBJS:%.o=%.d)
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ LIB_OBJS += edit.o
|
||||||
|
|
||||||
#LIB_OBJS += pcsc_funcs.o
|
#LIB_OBJS += pcsc_funcs.o
|
||||||
|
|
||||||
|
_OBJS_VAR := LIB_OBJS
|
||||||
|
include ../objs.mk
|
||||||
libutils.a: $(LIB_OBJS)
|
libutils.a: $(LIB_OBJS)
|
||||||
$(AR) crT $@ $?
|
$(AR) crT $@ $?
|
||||||
|
|
||||||
-include $(OBJS:%.o=%.d)
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ LIB_OBJS= \
|
||||||
wps_upnp_ssdp.o \
|
wps_upnp_ssdp.o \
|
||||||
wps_upnp_web.o
|
wps_upnp_web.o
|
||||||
|
|
||||||
|
_OBJS_VAR := LIB_OBJS
|
||||||
|
include ../objs.mk
|
||||||
libwps.a: $(LIB_OBJS)
|
libwps.a: $(LIB_OBJS)
|
||||||
$(AR) crT $@ $?
|
$(AR) crT $@ $?
|
||||||
|
|
||||||
-include $(OBJS:%.o=%.d)
|
|
||||||
|
|
|
@ -5,6 +5,13 @@ ALL=test-base64 test-md4 test-milenage \
|
||||||
|
|
||||||
include ../src/build.rules
|
include ../src/build.rules
|
||||||
|
|
||||||
|
# for now, keep building in this folder, otherwise we need to
|
||||||
|
# put each object for each test into a separate variable and
|
||||||
|
# then do the objs.mk dance for it ...
|
||||||
|
%.o: %.c
|
||||||
|
$(Q)$(CC) -c -o $@ $(CFLAGS) $<
|
||||||
|
@$(E) " CC " $<
|
||||||
|
|
||||||
ifdef LIBFUZZER
|
ifdef LIBFUZZER
|
||||||
CC=clang
|
CC=clang
|
||||||
CFLAGS = -MMD -O2 -Wall -g
|
CFLAGS = -MMD -O2 -Wall -g
|
||||||
|
|
|
@ -71,6 +71,12 @@ TOBJS += gcmp.o
|
||||||
|
|
||||||
OBJS_cli = wlantest_cli.o
|
OBJS_cli = wlantest_cli.o
|
||||||
|
|
||||||
|
_OBJS_VAR := OBJS
|
||||||
|
include ../src/objs.mk
|
||||||
|
_OBJS_VAR := TOBJS
|
||||||
|
include ../src/objs.mk
|
||||||
|
_OBJS_VAR := OBJS_cli
|
||||||
|
include ../src/objs.mk
|
||||||
|
|
||||||
wlantest: $(OBJS) $(OWN_LIBS)
|
wlantest: $(OBJS) $(OWN_LIBS)
|
||||||
$(LDO) $(LDFLAGS) -o wlantest $(OBJS) $(OWN_LIBS) $(LIBS)
|
$(LDO) $(LDFLAGS) -o wlantest $(OBJS) $(OWN_LIBS) $(LIBS)
|
||||||
|
@ -82,6 +88,4 @@ test_vectors: $(TOBJS) $(OWN_LIBS)
|
||||||
$(LDO) $(LDFLAGS) -o test_vectors $(TOBJS) $(OWN_LIBS) $(LIBS)
|
$(LDO) $(LDFLAGS) -o test_vectors $(TOBJS) $(OWN_LIBS) $(LIBS)
|
||||||
|
|
||||||
clean: common-clean
|
clean: common-clean
|
||||||
rm -f core *~ *.o *.d
|
rm -f core *~
|
||||||
|
|
||||||
-include $(OBJS:%.o=%.d)
|
|
||||||
|
|
|
@ -1860,28 +1860,40 @@ dynamic_eap_methods: $(EAPDYN)
|
||||||
|
|
||||||
BCHECK=../src/drivers/build.wpa_supplicant
|
BCHECK=../src/drivers/build.wpa_supplicant
|
||||||
|
|
||||||
|
_OBJS_VAR := OBJS_priv
|
||||||
|
include ../src/objs.mk
|
||||||
wpa_priv: $(BCHECK) $(OBJS_priv)
|
wpa_priv: $(BCHECK) $(OBJS_priv)
|
||||||
$(Q)$(LDO) $(LDFLAGS) -o wpa_priv $(OBJS_priv) $(LIBS)
|
$(Q)$(LDO) $(LDFLAGS) -o wpa_priv $(OBJS_priv) $(LIBS)
|
||||||
@$(E) " LD " $@
|
@$(E) " LD " $@
|
||||||
|
|
||||||
$(OBJS_c) $(OBJS_t) $(OBJS_t2) $(OBJS) $(BCHECK) $(EXTRA_progs): .config
|
$(OBJS_c) $(OBJS_t) $(OBJS_t2) $(OBJS) $(BCHECK) $(EXTRA_progs): .config
|
||||||
|
|
||||||
|
_OBJS_VAR := OBJS
|
||||||
|
include ../src/objs.mk
|
||||||
wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs)
|
wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs)
|
||||||
$(Q)$(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS)
|
$(Q)$(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS)
|
||||||
@$(E) " LD " $@
|
@$(E) " LD " $@
|
||||||
|
|
||||||
|
_OBJS_VAR := OBJS_t
|
||||||
|
include ../src/objs.mk
|
||||||
eapol_test: $(OBJS_t)
|
eapol_test: $(OBJS_t)
|
||||||
$(Q)$(LDO) $(LDFLAGS) -o eapol_test $(OBJS_t) $(LIBS)
|
$(Q)$(LDO) $(LDFLAGS) -o eapol_test $(OBJS_t) $(LIBS)
|
||||||
@$(E) " LD " $@
|
@$(E) " LD " $@
|
||||||
|
|
||||||
|
_OBJS_VAR := OBJS_t2
|
||||||
|
include ../src/objs.mk
|
||||||
preauth_test: $(OBJS_t2)
|
preauth_test: $(OBJS_t2)
|
||||||
$(Q)$(LDO) $(LDFLAGS) -o preauth_test $(OBJS_t2) $(LIBS)
|
$(Q)$(LDO) $(LDFLAGS) -o preauth_test $(OBJS_t2) $(LIBS)
|
||||||
@$(E) " LD " $@
|
@$(E) " LD " $@
|
||||||
|
|
||||||
|
_OBJS_VAR := OBJS_p
|
||||||
|
include ../src/objs.mk
|
||||||
wpa_passphrase: $(OBJS_p)
|
wpa_passphrase: $(OBJS_p)
|
||||||
$(Q)$(LDO) $(LDFLAGS) -o wpa_passphrase $(OBJS_p) $(LIBS_p) $(LIBS)
|
$(Q)$(LDO) $(LDFLAGS) -o wpa_passphrase $(OBJS_p) $(LIBS_p) $(LIBS)
|
||||||
@$(E) " LD " $@
|
@$(E) " LD " $@
|
||||||
|
|
||||||
|
_OBJS_VAR := OBJS_c
|
||||||
|
include ../src/objs.mk
|
||||||
wpa_cli: $(OBJS_c)
|
wpa_cli: $(OBJS_c)
|
||||||
$(Q)$(LDO) $(LDFLAGS) -o wpa_cli $(OBJS_c) $(LIBS_c)
|
$(Q)$(LDO) $(LDFLAGS) -o wpa_cli $(OBJS_c) $(LIBS_c)
|
||||||
@$(E) " LD " $@
|
@$(E) " LD " $@
|
||||||
|
@ -1895,6 +1907,8 @@ LIBCTRLSO += ../src/utils/os_$(CONFIG_OS).c
|
||||||
LIBCTRLSO += ../src/utils/common.c
|
LIBCTRLSO += ../src/utils/common.c
|
||||||
LIBCTRLSO += ../src/utils/wpa_debug.c
|
LIBCTRLSO += ../src/utils/wpa_debug.c
|
||||||
|
|
||||||
|
_OBJS_VAR := LIBCTRL
|
||||||
|
include ../src/objs.mk
|
||||||
libwpa_client.a: $(LIBCTRL)
|
libwpa_client.a: $(LIBCTRL)
|
||||||
$(Q)rm -f $@
|
$(Q)rm -f $@
|
||||||
$(Q)$(AR) crs $@ $?
|
$(Q)$(AR) crs $@ $?
|
||||||
|
@ -1904,14 +1918,19 @@ libwpa_client.so: $(LIBCTRLSO)
|
||||||
@$(E) " CC $@ ($^)"
|
@$(E) " CC $@ ($^)"
|
||||||
$(Q)$(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -fPIC $^
|
$(Q)$(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -fPIC $^
|
||||||
|
|
||||||
libwpa_test1: libwpa_test.o libwpa_client.a
|
OBJS_wpatest := libwpa_test.o
|
||||||
$(Q)$(LDO) $(LDFLAGS) -o libwpa_test1 libwpa_test.o libwpa_client.a $(LIBS_c)
|
_OBJS_VAR := OBJS_wpatest
|
||||||
|
include ../src/objs.mk
|
||||||
|
libwpa_test1: $(OBJS_wpatest) libwpa_client.a
|
||||||
|
$(Q)$(LDO) $(LDFLAGS) -o libwpa_test1 $(OBJS_wpatest) libwpa_client.a $(LIBS_c)
|
||||||
@$(E) " LD " $@
|
@$(E) " LD " $@
|
||||||
|
|
||||||
libwpa_test2: libwpa_test.o libwpa_client.so
|
libwpa_test2: $(OBJS_wpatest) libwpa_client.so
|
||||||
$(Q)$(LDO) $(LDFLAGS) -o libwpa_test2 libwpa_test.o -L. -lwpa_client $(LIBS_c)
|
$(Q)$(LDO) $(LDFLAGS) -o libwpa_test2 $(OBJS_wpatest) -L. -lwpa_client $(LIBS_c)
|
||||||
@$(E) " LD " $@
|
@$(E) " LD " $@
|
||||||
|
|
||||||
|
_OBJS_VAR := OBJS_nfc
|
||||||
|
include ../src/objs.mk
|
||||||
nfc_pw_token: $(OBJS_nfc)
|
nfc_pw_token: $(OBJS_nfc)
|
||||||
$(Q)$(LDO) $(LDFLAGS) -o nfc_pw_token $(OBJS_nfc) $(LIBS)
|
$(Q)$(LDO) $(LDFLAGS) -o nfc_pw_token $(OBJS_nfc) $(LIBS)
|
||||||
@$(E) " LD " $@
|
@$(E) " LD " $@
|
||||||
|
@ -1989,8 +2008,9 @@ FIPSLD=$(FIPSDIR)/bin/fipsld
|
||||||
fips:
|
fips:
|
||||||
$(MAKE) CC=$(FIPSLD) FIPSLD_CC="$(CC)"
|
$(MAKE) CC=$(FIPSLD) FIPSLD_CC="$(CC)"
|
||||||
|
|
||||||
lcov-html: wpa_supplicant.gcda
|
.PHONY: lcov-html
|
||||||
lcov -c -d .. > lcov.info
|
lcov-html: $(call BUILDOBJ,wpa_supplicant.gcda)
|
||||||
|
lcov -c -d $(BUILDDIR) > lcov.info
|
||||||
genhtml lcov.info --output-directory lcov-html
|
genhtml lcov.info --output-directory lcov-html
|
||||||
|
|
||||||
clean: common-clean
|
clean: common-clean
|
||||||
|
@ -2005,5 +2025,3 @@ clean: common-clean
|
||||||
rm -f libwpa_client.a
|
rm -f libwpa_client.a
|
||||||
rm -f libwpa_client.so
|
rm -f libwpa_client.so
|
||||||
rm -f libwpa_test1 libwpa_test2
|
rm -f libwpa_test1 libwpa_test2
|
||||||
|
|
||||||
-include $(OBJS:%.o=%.d)
|
|
||||||
|
|
Loading…
Reference in a new issue