Force rebuilding of src/drivers between hostapd and wpa_supplicant

This is a (hopefully) temporary workaround to allow the same source code
tree to be used for building hostapd and wpa_supplicant without having
to manually force recompilation of some files. Currently, some of the
driver wrapper files need to be built separately for hostapd and
wpa_supplicant (#ifdef's in the files based on AP functionality).

This is somewhat racy as far as parallel make execution is concerned,
i.e., it may be necessary to run "make -j#" twice (plain "make" works
fine. Since this is supposed to be a temporary workaround, there is not
much point in trying to fix this with any more complex make processing.
This commit is contained in:
Jouni Malinen 2009-08-14 20:40:37 +03:00
parent fe6bdb777e
commit ba30964b60
4 changed files with 22 additions and 3 deletions

View file

@ -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

2
src/drivers/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
build.wpa_supplicant
build.hostapd

View file

@ -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.

View file

@ -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)