PHONY := all
all: akaros-kernel
+# Export the location of this top level directory
+AKAROS_ROOT = $(CURDIR)
+export AKAROS_ROOT
+
# Setup dumping ground for object files and any temporary files we need to
# generate for non-kbuild targets
OBJDIR ?= obj
# 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
-pthread: parlib
-pthread: parlib
+user-dirs = parlib pthread benchutil iplib ndblib bsd
+benchutil: parlib
+pthread: parlib benchutil
iplib: parlib
ndblib: iplib
+bsd: parlib iplib
PHONY += install-libs $(user-dirs)
install-libs: $(user-dirs) symlinks cc-exists
PHONY += userclean $(clean-user-dirs)
clean-user-dirs := $(addprefix _clean_user_,$(user-dirs))
-userclean: $(clean-user-dirs) testclean
+userclean: $(clean-user-dirs) testclean utestclean
$(clean-user-dirs):
@cd user/$(patsubst _clean_user_%,%,$@) && $(MAKE) clean
tests: install-libs
@$(MAKE) -f tests/Makefile
+PHONY += utest
+utest: $(user-dirs)
+ @cd user/$@ && $(MAKE)
+
testclean:
@$(MAKE) -f tests/Makefile clean
+utestclean:
+ @cd user/utest && $(MAKE) clean
+
# KFS related stuff
PHONY += fill-kfs unfill-kfs
XCC_SO_FILES = $(addprefix $(XCC_TARGET_ROOT)/lib/, *.so*)
$(OBJDIR)/.dont-force-fill-kfs:
$(Q)rm -rf $(addprefix $(FIRST_KFS_PATH)/lib/, $(notdir $(XCC_SO_FILES)))
@echo "Cross Compiler 'so' files removed from KFS"
- @$(MAKE) -f tests/Makefile unfill-kfs
+ @$(MAKE) -f tests/Makefile uninstall
+ @echo "Apps from /test removed from KFS"
+ @cd user/utest && $(MAKE) uninstall
+ @echo "User space tests removed from KFS"
@touch $(OBJDIR)/.dont-force-fill-kfs
fill-kfs: $(OBJDIR)/.dont-force-fill-kfs install-libs
@mkdir -p $(FIRST_KFS_PATH)/lib
$(Q)cp -uP $(XCC_SO_FILES) $(FIRST_KFS_PATH)/lib
@echo "Cross Compiler 'so' files installed to KFS"
- @$(MAKE) -f tests/Makefile fill-kfs
+ @$(MAKE) -f tests/Makefile install
+ @echo "Apps from /test installed to KFS"
+ @cd user/utest && $(MAKE) install
+ @echo "User space tests installed to KFS"
# Use doxygen to make documentation for ROS (Untested since 2010 or so)
doxygen-dir := $(CUR_DIR)/Documentation/doxygen