Clean up in a more common fashion as well, initially for ../src/.
Also add $(Q) to the clean target in src/
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
eap_example: $(OBJS_ex) $(LIBEAP)
$(LDO) $(LDFLAGS) -o eap_example $(OBJS_ex) -L. -leap $(LIBS)
-clean:
- $(MAKE) -C ../src clean
- rm -f core *~ *.o *.d libeap.a libeap.so $(ALL)
+clean: common-clean
+ rm -f core *~ *.o *.d libeap.a libeap.so
-include $(OBJS:%.o=%.d)
lcov -c -d .. > lcov.info
genhtml lcov.info --output-directory lcov-html
-clean:
- $(MAKE) -C ../src clean
- rm -f core *~ *.o hostapd hostapd_cli nt_password_hash hlr_auc_gw
+clean: common-clean
+ rm -f core *~ *.o nt_password_hash hlr_auc_gw
rm -f sae_pk_gen
rm -f *.d *.gcno *.gcda *.gcov
rm -f lcov.info
$(Q)$(LDO) $(LDFLAGS) -o hs20-osu-client $(OBJS) $(LIBS)
@$(E) " LD " $@
-clean:
- rm -f core *~ *.o *.d hs20-osu-client
+clean: common-clean
+ rm -f core *~ *.o *.d
rm -f ../../src/utils/*.o
rm -f ../../src/utils/*.d
rm -f ../../src/common/*.o
hs20_spp_server: $(OBJS)
$(LDO) $(LDFLAGS) -o hs20_spp_server $(OBJS) $(LIBS)
-clean:
- rm -f core *~ *.o *.d hs20_spp_server
+clean: common-clean
+ rm -f core *~ *.o *.d
rm -f ../../src/utils/*.o
rm -f ../../src/utils/*.d
rm -f ../../src/crypto/*.o
radius_example: $(OBJS_ex) $(LIBS)
$(LDO) $(LDFLAGS) -o radius_example $(OBJS_ex) $(LIBS) $(LLIBS)
-clean:
- $(MAKE) -C ../src clean
- rm -f core *~ *.o *.d $(ALL)
+clean: common-clean
+ rm -f core *~ *.o *.d
-include $(OBJS:%.o=%.d)
for d in $(SUBDIRS); do [ -d $$d ] && $(MAKE) -C $$d; done
clean:
- for d in $(SUBDIRS); do [ -d $$d ] && $(MAKE) -C $$d clean; done
- rm -f *~
+ $(Q)for d in $(SUBDIRS); do [ -d $$d ] && $(MAKE) -C $$d clean; done
+ $(Q)rm -f *~
install:
for d in $(SUBDIRS); do [ -d $$d ] && $(MAKE) -C $$d install; done
# disable built-in rules
.SUFFIXES:
+ROOTDIR := $(dir $(lastword $(MAKEFILE_LIST)))
+ROOTDIR := $(dir $(ROOTDIR:%/=%))
+
ifndef CC
CC=gcc
endif
$(Q)$(CC) -c -o $@ $(CFLAGS) $<
@$(E) " CC " $<
endif
+
+.PHONY: common-clean
+common-clean:
+ $(Q)$(MAKE) -C $(ROOTDIR)/src clean
+ $(Q)rm -f $(ALL)
@echo
@echo All tests completed successfully.
-clean:
- $(MAKE) -C ../src clean
- rm -f $(ALL) *~ *.o *.d
+clean: common-clean
+ rm -f *~ *.o *.d
rm -f test-eapol
rm -f test-https
rm -f test-json
test_vectors: $(TOBJS) $(OWN_LIBS)
$(LDO) $(LDFLAGS) -o test_vectors $(TOBJS) $(OWN_LIBS) $(LIBS)
-clean:
- $(MAKE) -C ../src clean
- rm -f core *~ *.o *.d $(ALL)
+clean: common-clean
+ rm -f core *~ *.o *.d
-include $(OBJS:%.o=%.d)
lcov -c -d .. > lcov.info
genhtml lcov.info --output-directory lcov-html
-clean:
+clean: common-clean
$(MAKE) -C ../src clean
$(MAKE) -C dbus clean
rm -f core *~ *.o *.d *.gcno *.gcda *.gcov
- rm -f eap_*.so $(ALL) $(WINALL) eapol_test preauth_test
+ rm -f eap_*.so $(WINALL) eapol_test preauth_test
rm -f wpa_priv
rm -f nfc_pw_token
rm -f lcov.info