From 916b8d053bbf6f8c6abec0bf565229056deca87a Mon Sep 17 00:00:00 2001 From: Quinten Kock Date: Fri, 4 Dec 2020 03:28:09 +0100 Subject: [PATCH] Add make all to build all targets for kernel --- kernel/Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/kernel/Makefile b/kernel/Makefile index b91e351..3328131 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -1,4 +1,4 @@ -ARCHES = x86_64 i386 aarch64 +ARCHES = x86_64 i386 ARCH ?= x86_64 @@ -21,9 +21,13 @@ ARCHFILES := $(ARCHFILES) $(shell find src/arch/$(ARCH) -type f -name '*.c' -pri HFILES := $(shell find src -type f -name '*.h') OBJ := $(patsubst src/%.c,obj/$(ARCH)/%.o,$(CFILES) $(ARCHFILES)) -.PHONY: all clean obj +.PHONY: all clean obj $(ARCHES) -all: bin/$(TARGET)-$(ARCH) +default: bin/$(TARGET)-$(ARCH) +all: $(ARCHES) + +$(ARCHES): + $(MAKE) ARCH=$@ bin/$(TARGET)-$(ARCH): $(OBJ) @mkdir -p $(@D)