1
0
Fork 0
mirror of https://github.com/tailix/kernel.git synced 2025-07-31 22:00:58 -04:00

Makefile refactoring

This commit is contained in:
Braiden Vasco 2017-11-09 06:01:31 +00:00
parent d36d79f5d5
commit 2006cfcf74
3 changed files with 9 additions and 8 deletions

View file

@ -14,6 +14,8 @@ export MODULES = $(addprefix $(shell pwd)/modules/, dummy1.bin dummy2.bin)
export CFLAGS = -std=gnu99 -ffreestanding -nostdinc -fno-builtin -fno-stack-protector -Wall -Wextra -I $(INCLUDE) export CFLAGS = -std=gnu99 -ffreestanding -nostdinc -fno-builtin -fno-stack-protector -Wall -Wextra -I $(INCLUDE)
SUBDIRS = arch iso libk modules src test
ifeq (none, $(ARCH)) ifeq (none, $(ARCH))
run: all-kernel run: all-kernel
@$(KERNEL) @$(KERNEL)
@ -23,7 +25,7 @@ endif
all: all-kernel all: all-kernel
clean: clean-kernel clean-iso clean-libk clean-arch clean-src clean-test clean-modules clean: clean-kernel $(addprefix clean-, $(SUBDIRS))
test: run-test test: run-test

View file

@ -1,12 +1,11 @@
export OUTPUT = kernelmq export OUTPUT = kernelmq
ARCHES = $(shell ls -d */) SUBDIRS = none x86
ARCHES := $(ARCHES:/=)
all: all:
make all -C $(ARCH) make all -C $(ARCH)
clean: $(addprefix clean-, $(ARCHES)) clean: $(addprefix clean-, $(SUBDIRS))
clean-%: clean-%:
make clean -C $* make clean -C $*

View file

@ -1,8 +1,8 @@
SUITES = libk SUBDIRS = libk
run: $(addprefix run-, $(SUITES)) run: $(addprefix run-, $(SUBDIRS))
all: $(addprefix all-, $(SUITES)) all: $(addprefix all-, $(SUBDIRS))
clean: $(addprefix clean-, $(SUITES)) clean: $(addprefix clean-, $(SUBDIRS))
run-%: all-% run-%: all-%
make run -C $* make run -C $*