Makefile: refactor subdirectory makefiles
This commit is contained in:
12
Makefile
12
Makefile
@ -22,11 +22,15 @@ KCFLAGS = -g -Wall -Wextra -Werror -nostdlib -nostartfiles -fno-builtin -std=gnu
|
||||
KLDFLAGS = -T link.ld -L /usr/lib/gcc/arm-elf/4.7.0/
|
||||
EXTRA_LIBS = -lgcc
|
||||
|
||||
KOBJS =
|
||||
# Define KOBJS as a 'simply expanded' variable
|
||||
KOBJS :=
|
||||
|
||||
include boot/Makefile.inc
|
||||
include kernel/Makefile.inc
|
||||
include devices/Makefile.inc
|
||||
# Initialize sub-directory Makefile inclusion
|
||||
BASEDIR = $(shell pwd)
|
||||
SUBDIRS := boot kernel devices
|
||||
ifneq (,$(SUBDIRS))
|
||||
include $(patsubst %,%/kernel.mk,$(SUBDIRS))
|
||||
endif
|
||||
|
||||
.PHONY: all clean boot boot-gdb
|
||||
|
||||
|
Reference in New Issue
Block a user