mirror of
https://github.com/tailix/kernel.git
synced 2025-07-31 22:00:58 -04:00
Makefile refactoring
This commit is contained in:
parent
d36d79f5d5
commit
2006cfcf74
3 changed files with 9 additions and 8 deletions
4
Makefile
4
Makefile
|
@ -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)
|
||||
|
||||
SUBDIRS = arch iso libk modules src test
|
||||
|
||||
ifeq (none, $(ARCH))
|
||||
run: all-kernel
|
||||
@$(KERNEL)
|
||||
|
@ -23,7 +25,7 @@ endif
|
|||
|
||||
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
|
||||
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
export OUTPUT = kernelmq
|
||||
|
||||
ARCHES = $(shell ls -d */)
|
||||
ARCHES := $(ARCHES:/=)
|
||||
SUBDIRS = none x86
|
||||
|
||||
all:
|
||||
make all -C $(ARCH)
|
||||
|
||||
clean: $(addprefix clean-, $(ARCHES))
|
||||
clean: $(addprefix clean-, $(SUBDIRS))
|
||||
|
||||
clean-%:
|
||||
make clean -C $*
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
SUITES = libk
|
||||
SUBDIRS = libk
|
||||
|
||||
run: $(addprefix run-, $(SUITES))
|
||||
all: $(addprefix all-, $(SUITES))
|
||||
clean: $(addprefix clean-, $(SUITES))
|
||||
run: $(addprefix run-, $(SUBDIRS))
|
||||
all: $(addprefix all-, $(SUBDIRS))
|
||||
clean: $(addprefix clean-, $(SUBDIRS))
|
||||
|
||||
run-%: all-%
|
||||
make run -C $*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue