@@ -4,9 +4,9 @@ export ARCH = x86 export OS = lin export BITS = 64 export ROOT = $(PWD) -export TMP = $(PWD)/tmp +export TMP = $(PWD)/gen ifneq ($(BITS),) export TARGET = $(ARCH).$(OS).$(BITS) else @@ -93,9 +93,9 @@ lists = moddirs functions assemblies fnobjects rtobjects binaries binmods POSIX dbg: @echo -e lists: $(foreach var, $(lists), "\\n - \\e[1m$(var)\\e[m = $($(var))") -%.obj: %/makefile $(TMP)/system_calls.h $(TMP)/system_calls.s $(OUT) +%.obj: %/makefile $(OUT) cd $* && $(MAKE) obj %.tool: %/makefile $(OUT) cd $* && $(MAKE) tool @@ -102,14 +102,21 @@ %.dbg: %/makefile $(OUT) cd $* && $(MAKE) dbg -%.def: %/makefile $(TMP)/typesize.def $(OUT) $(OUT)/k +%.def: %/makefile $(TMP)/typesize.def \ + $(TMP)/system_calls.h \ + $(TMP)/system_calls.s \ + $(TMP)/error_table.h \ + $(OUT) $(OUT)/k cd $* && $(MAKE) def .PRECIOUS: $(TMP)/system_calls.% $(TMP)/system_calls.%: arch/makefile $(MAKE) -C arch $@ + +$(TMP)/error_table.h: arch/makefile + $(MAKE) -C arch $@ $(TMP)/typesize.def: arch/makefile $(TMP) $(MAKE) -C arch $@