diff --git a/hostapd/Makefile b/hostapd/Makefile index fe09dfe9c..de28dbc41 100644 --- a/hostapd/Makefile +++ b/hostapd/Makefile @@ -596,7 +596,15 @@ verify_config: install: all for i in $(ALL); do cp $$i /usr/local/bin/$$i; done -hostapd: $(OBJS) +../src/drivers/build.hostapd: + @if [ -e ../src/drivers/build.wpa_supplicant ]; then \ + $(MAKE) -C ../src/drivers clean; \ + fi + @touch ../src/drivers/build.hostapd + +BCHECK=../src/drivers/build.hostapd + +hostapd: $(BCHECK) $(OBJS) $(CC) -o hostapd $(OBJS) $(LIBS) OBJS_c = hostapd_cli.o ../src/common/wpa_ctrl.o ../src/utils/os_$(CONFIG_OS).o diff --git a/src/drivers/.gitignore b/src/drivers/.gitignore new file mode 100644 index 000000000..1d9e0e661 --- /dev/null +++ b/src/drivers/.gitignore @@ -0,0 +1,2 @@ +build.wpa_supplicant +build.hostapd diff --git a/src/drivers/Makefile b/src/drivers/Makefile index cffba620d..8da6994e2 100644 --- a/src/drivers/Makefile +++ b/src/drivers/Makefile @@ -4,6 +4,7 @@ all: clean: for d in $(SUBDIRS); do make -C $$d clean; done rm -f *~ *.o *.d + rm -f build.wpa_supplicant build.hostapd install: @echo Nothing to be made. diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile index 15c86884e..945546068 100644 --- a/wpa_supplicant/Makefile +++ b/wpa_supplicant/Makefile @@ -1084,10 +1084,18 @@ endif dynamic_eap_methods: $(EAPDYN) -wpa_priv: $(OBJS_priv) +../src/drivers/build.wpa_supplicant: + @if [ -e ../src/drivers/build.hostapd ]; then \ + $(MAKE) -C ../src/drivers clean; \ + fi + @touch ../src/drivers/build.wpa_supplicant + +BCHECK=../src/drivers/build.wpa_supplicant + +wpa_priv: $(BCHECK) $(OBJS_priv) $(LDO) $(LDFLAGS) -o wpa_priv $(OBJS_priv) $(LIBS) -wpa_supplicant: .config $(OBJS) $(EXTRA_progs) +wpa_supplicant: .config $(BCHECK) $(OBJS) $(EXTRA_progs) $(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS) eapol_test: .config $(OBJS_t)