-include Makefile.vars
-BUILD_SUBDIRS = $(addprefix build/, $(SUBDIRS))
+# -*- makefile -*-
-all: build build/Makefile $(BUILD_SUBDIRS)
- $(MAKE) -C build
+all:
-$(BUILD_SUBDIRS):
- mkdir $@
-build:
- mkdir $@
+include Make.vars
+
+DIRS = $(sort $(addprefix build/,$(KERNEL_SUBDIRS) $(TEST_SUBDIRS) lib/user))
+
+all grade check: $(DIRS) build/Makefile
+ cd build && $(MAKE) $@
+$(DIRS):
+ mkdir -p $@
build/Makefile: ../Makefile.build
cp $< $@
+build/%: $(DIRS) build/Makefile
+ cd build && $(MAKE) $*
+
clean:
rm -rf build