aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/Makefile
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2020-09-18 09:49:53 (GMT)
committerJouni Malinen <j@w1.fi>2020-10-10 09:51:39 (GMT)
commit722138cd253f32f66d5da9f7e5a8a57a6448a16d (patch)
tree56fa28e704a31ecf97d081e29d41107c34143705 /hostapd/Makefile
parent0464d5d5d6a5287f4ca5d75f4e9d7abac17bd0ea (diff)
downloadhostap-722138cd253f32f66d5da9f7e5a8a57a6448a16d.zip
hostap-722138cd253f32f66d5da9f7e5a8a57a6448a16d.tar.gz
hostap-722138cd253f32f66d5da9f7e5a8a57a6448a16d.tar.bz2
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>
Diffstat (limited to 'hostapd/Makefile')
-rw-r--r--hostapd/Makefile22
1 files changed, 17 insertions, 5 deletions
diff --git a/hostapd/Makefile b/hostapd/Makefile
index ac83730..f07acdf 100644
--- a/hostapd/Makefile
+++ b/hostapd/Makefile
@@ -1272,6 +1272,9 @@ install: $(addprefix $(DESTDIR)$(BINDIR)/,$(ALL))
BCHECK=../src/drivers/build.hostapd
+_OBJS_VAR := OBJS
+include ../src/objs.mk
+
hostapd: $(BCHECK) $(OBJS)
$(Q)$(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS)
@$(E) " LD " $@
@@ -1279,6 +1282,10 @@ hostapd: $(BCHECK) $(OBJS)
ifdef CONFIG_WPA_TRACE
OBJS_c += ../src/utils/trace.o
endif
+
+_OBJS_VAR := OBJS_c
+include ../src/objs.mk
+
hostapd_cli: $(OBJS_c)
$(Q)$(CC) $(LDFLAGS) -o hostapd_cli $(OBJS_c) $(LIBS_c)
@$(E) " LD " $@
@@ -1335,6 +1342,13 @@ SOBJS += ../src/crypto/sha256-kdf.o
SOBJS += ../src/crypto/sha384-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)
$(Q)$(CC) $(LDFLAGS) -o nt_password_hash $(NOBJS) $(LIBS_n)
@$(E) " LD " $@
@@ -1347,15 +1361,13 @@ sae_pk_gen: $(SOBJS)
$(Q)$(CC) $(LDFLAGS) -o sae_pk_gen $(SOBJS) $(LIBS_s)
@$(E) " LD " $@
+.PHONY: lcov-html
lcov-html:
- lcov -c -d .. > lcov.info
+ lcov -c -d $(BUILDDIR) > lcov.info
genhtml lcov.info --output-directory lcov-html
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 *.d *.gcno *.gcda *.gcov
rm -f lcov.info
rm -rf lcov-html
-
--include $(OBJS:%.o=%.d)