Fix wonky tail queue swap in condition variables code.
[akaros.git] / Makefile
index bd19cad..12fe6c3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -122,7 +122,7 @@ endif
 
 PHONY += symlinks clean_symlinks
 clean_symlinks: objclean
-       @rm -f kern/include/arch kern/boot user/parlib/include/arch
+       @rm -f kern/include/arch kern/boot user/parlib/include/parlib/arch
 
 arch-link := $(notdir $(shell readlink kern/include/arch))
 valid-arches := $(notdir $(wildcard kern/arch/*))
@@ -140,7 +140,7 @@ symlinks: clean_symlinks
        @echo Making symlinks...
        $(Q)ln -fs ../arch/$(ARCH) kern/include/arch
        $(Q)ln -fs arch/$(ARCH)/boot kern/boot
-       $(Q)ln -fs $(ARCH) user/parlib/include/arch
+       $(Q)ln -fs $(ARCH) user/parlib/include/parlib/arch
        $(Q)$(MAKE) -f $(srctree)/Makefile clean
 
     else
@@ -360,7 +360,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
+CFLAGS_KERNEL += -Wall -Wno-format -Wno-unused -Werror
 CFLAGS_KERNEL += -DROS_KERNEL 
 CFLAGS_KERNEL += -include include/generated/autoconf.h -include include/common.h
 CFLAGS_KERNEL += -fplan9-extensions
@@ -369,6 +369,9 @@ CFLAGS_KERNEL += -m64 -g
 else
 CFLAGS_KERNEL += -m32 -gstabs
 endif
+ifeq ($(CONFIG_BETTER_BACKTRACE),y)
+CFLAGS_KERNEL += -fno-optimize-sibling-calls
+endif
 
 # TODO: do we need this, or can we rely on the compiler's defines?
 CFLAGS_KERNEL += -D$(ARCH)
@@ -403,9 +406,6 @@ export CFLAGS_USER CXXFLAGS_USER CFLAGS_USER_LIBS
 # kernel build output.  Right now, it's only passed down to tests/
 dummy-1 := $(shell mkdir -p $(OBJDIR)/kern/)
 
-# Machinery to create the kernel build info source
-export BUILD_INFO_FILE
-
 # Since we're doing this outside of the dot-config part, some targets, such as
 # clean, won't read in our .config/auto.conf, and won't know about the
 # KFS_PATH.  Future rules related to KFS will have issues (mkdir with no
@@ -417,8 +417,9 @@ kfs-paths := kern/kfs
 endif
 
 FIRST_KFS_PATH = $(firstword $(kfs-paths))
+ABS_KFS_PATH = $(abspath $(FIRST_KFS_PATH))
 
-export OBJDIR FIRST_KFS_PATH
+export OBJDIR FIRST_KFS_PATH ABS_KFS_PATH
 
 # Avoiding implicit rules
 $(srctree)/Makelocal: ;
@@ -541,6 +542,7 @@ $(ext2_bdev_obj): $(ext2-bdev)
 quiet_cmd_link-akaros = LINK    $@
       cmd_link-akaros = $(CONFIG_SHELL) scripts/link-kernel.sh $@ \
                         kern/arch/$(ARCH)/$(KERNEL_LD) $(LDFLAGS_KERNEL) \
+                        --build-id=sha1 \
                         $(akaros-deps) $(gcc-lib) $(kern_cpio_obj) \
                         $(ext2_bdev_obj); \
                         $(ARCH_POST_LINK_CMD)
@@ -591,7 +593,7 @@ benchutil: parlib
 pthread: parlib benchutil
 iplib: parlib
 ndblib: iplib
-vmm: parlib
+vmm: parlib benchutil
 
 PHONY += install-libs $(user-dirs)
 install-libs: $(user-dirs) symlinks cc-exists
@@ -669,17 +671,33 @@ realclean: userclean mrproper doxyclean objclean
 # Bundled apps
 # =========================================================================
 
-PHONY += apps-install
-apps-install: install-libs
+app-dirs =
+tagged-app-dirs := $(subst /,__,$(app-dirs))
+app-dirs-install := $(addprefix _install_,$(tagged-app-dirs))
+app-dirs-clean := $(addprefix _clean_,$(tagged-app-dirs))
+
+PHONY += $(app-dirs-install) $(app-dirs-clean)
+
+$(app-dirs-install):
+       @$(MAKE) -C $(patsubst _install_%,%,$(subst __,/,$@)) install
+
+$(app-dirs-clean):
+       @$(MAKE) -C $(patsubst _clean_%,%,$(subst __,/,$@)) clean
+
+PHONY +=  apps-install
+apps-install: $(app-dirs-install)
        @$(call make_as_parent, -C tools/apps/busybox)
-       @$(call make_as_parent, -C tools/apps/snc install)
-       @$(call make_as_parent, -C tools/profile/perf install)
+       @$(call make_as_parent, -C tools/apps/ipconfig install)
+       @$(call make_as_parent, -C tools/dev-libs/elfutils install)
+       @$(call make_as_parent, -C tools/dev-util/perf install)
+       @$(call make_as_parent, -C tools/sys-apps/bash install)
 
 PHONY += apps-clean
-apps-clean:
+apps-clean: $(app-dirs-clean)
        @$(call make_as_parent, -C tools/apps/busybox clean)
-       @$(call make_as_parent, -C tools/apps/snc clean)
-       @$(call make_as_parent, -C tools/profile/perf 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)
 
 # Cross Compiler
 # =========================================================================