net: Add a function to dump TCP's hash table
[akaros.git] / Makefile
index 35ade64..0bd5a83 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -363,7 +363,7 @@ CFLAGS_KERNEL += -O2 -pipe -MD
 CFLAGS_KERNEL += -std=gnu99 -fgnu89-inline
 CFLAGS_KERNEL += -fno-strict-aliasing -fno-omit-frame-pointer
 CFLAGS_KERNEL += -fno-stack-protector
-CFLAGS_KERNEL += -Wall -Wno-format -Wno-unused -Werror
+CFLAGS_KERNEL += -Wall -Wno-format -Wno-unused -Werror -Wreturn-type
 CFLAGS_KERNEL += -DROS_KERNEL 
 CFLAGS_KERNEL += -include include/generated/autoconf.h -include include/common.h
 CFLAGS_KERNEL += -fplan9-extensions
@@ -396,7 +396,7 @@ export NOSTDINC_FLAGS XCC_TARGET_ROOT XCC_TARGET_LIB XCC_TARGET_INCLUDE
 export KBUILD_BUILTIN KBUILD_CHECKSRC
 
 CFLAGS_USER += -O2 -std=gnu99 -fno-stack-protector -fgnu89-inline \
-               -Wsystem-headers -Werror
+               -Wsystem-headers -Werror -Wreturn-type
 CXXFLAGS_USER += -O2
 CFLAGS_USER_LIBS += -fPIC -static -fno-omit-frame-pointer -g
 
@@ -591,19 +591,28 @@ endif #ifeq ($(mixed-targets),1)
 # List all userspace directories here, and state any dependencies between them,
 # such as how pthread depends on parlib.
 
-user-dirs = parlib pthread benchutil iplib ndblib vmm perfmon
+# Critical libraries, also built during the toolchain install
+user-base-dirs = parlib pthread benchutil iplib ndblib perfmon
 benchutil: parlib
 pthread: parlib benchutil
 iplib: parlib
 ndblib: iplib
-vmm: parlib benchutil
 
-PHONY += install-libs $(user-dirs)
-install-libs: $(user-dirs) symlinks cc-exists
+# Higher-level libraries.  Built before tests/, but after apps-install.
+# TODO: would like to move perfmon here, since it's not meant to be low-level.
+# But the apps-install has perf, which depends on user/perfmon.
+user-extra-dirs = vmm
+$(user-extra-dirs): $(user-base-dirs)
+
+user-dirs = $(user-base-dirs) $(user-extra-dirs)
+
+PHONY += install-base-libs $(user-dirs)
+install-base-libs: $(user-base-dirs) symlinks cc-exists
 
 $(user-dirs):
        @$(MAKE) -C user/$@ DEPLIBS="$^" && $(MAKE) -C user/$@ install
 
+PHONY += user
 user: $(user-dirs)
 
 PHONY += userclean $(clean-user-dirs)
@@ -614,7 +623,7 @@ $(clean-user-dirs):
        @$(MAKE) -C user/$(patsubst _clean_user_%,%,$@) clean
 
 tests/: tests
-tests: install-libs
+tests: user
        @$(MAKE) -f tests/Makefile
 
 PHONY += utest
@@ -642,7 +651,7 @@ $(OBJDIR)/.dont-force-fill-kfs:
        @echo "User space tests removed from KFS"
        @touch $(OBJDIR)/.dont-force-fill-kfs
 
-fill-kfs: $(OBJDIR)/.dont-force-fill-kfs install-libs tests
+fill-kfs: $(OBJDIR)/.dont-force-fill-kfs user tests
        @mkdir -p $(FIRST_KFS_PATH)/lib
        $(Q)cp -uP $(xcc-so-files) $(FIRST_KFS_PATH)/lib
        @echo "Cross Compiler 'so' files installed to KFS"
@@ -701,6 +710,7 @@ apps-clean: $(app-dirs-clean)
        @$(call make_as_parent, -C tools/apps/ipconfig clean)
        @$(call make_as_parent, -C tools/dev-libs/elfutils clean)
        @$(call make_as_parent, -C tools/dev-util/perf clean)
+       @$(call make_as_parent, -C tools/sys-apps/bash clean)
 
 # Cross Compiler
 # =========================================================================
@@ -736,7 +746,7 @@ $(xcc_subcmd_goals):
 PHONY += xcc-upgrade
 xcc-upgrade: xcc
        @$(MAKE) userclean
-       @$(MAKE) install-libs
+       @$(MAKE) install-base-libs
        @$(MAKE) testclean utestclean
        @$(call make_as_parent, apps-clean)
        @$(call make_as_parent, apps-install)