Implement pipes in userspace (XCC)
[akaros.git] / Makefile
index bd19cad..1fb54ba 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
@@ -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: ;
@@ -669,16 +670,27 @@ realclean: userclean mrproper doxyclean objclean
 # Bundled apps
 # =========================================================================
 
-PHONY += apps-install
-apps-install: install-libs
+app-dirs = tools/apps/snc
+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)
 
 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)
 
 # Cross Compiler