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:
Johannes Berg 2020-09-18 11:49:53 +02:00 committed by Jouni Malinen
parent 0464d5d5d6
commit 722138cd25
26 changed files with 136 additions and 82 deletions

View file

@ -24,10 +24,11 @@ LLIBS = -lrt
OBJS_ex = radius_example.o
_OBJS_VAR := OBJS_ex
include ../src/objs.mk
radius_example: $(OBJS_ex) $(LIBS)
$(LDO) $(LDFLAGS) -o radius_example $(OBJS_ex) $(LIBS) $(LLIBS)
clean: common-clean
rm -f core *~ *.o *.d
-include $(OBJS:%.o=%.d)