git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
feat: serial device interfacing
[lunaix-os.git]
/
lunaix-os
/
kernel.mk
diff --git
a/lunaix-os/kernel.mk
b/lunaix-os/kernel.mk
index 5d645140271c724e8305e4d27b35f3e1680daca2..c5596f893ab13b9d7929583b201b15b66a693c48 100644
(file)
--- a/
lunaix-os/kernel.mk
+++ b/
lunaix-os/kernel.mk
@@
-1,6
+1,8
@@
include os.mkinc
include toolchain.mkinc
include os.mkinc
include toolchain.mkinc
+kexclusion = $(shell cat ksrc.excludes)
+
define ksrc_dirs
kernel
hal
define ksrc_dirs
kernel
hal
@@
-19,6
+21,7
@@
kbin_dir := $(BUILD_DIR)
kbin := $(BUILD_NAME)
ksrc_files := $(foreach f, $(ksrc_dirs), $(shell find $(f) -name "*.[cS]"))
kbin := $(BUILD_NAME)
ksrc_files := $(foreach f, $(ksrc_dirs), $(shell find $(f) -name "*.[cS]"))
+ksrc_files := $(filter-out $(kexclusion),$(ksrc_files))
ksrc_objs := $(addsuffix .o,$(ksrc_files))
ksrc_deps := $(addsuffix .d,$(ksrc_files))
ksrc_objs := $(addsuffix .o,$(ksrc_files))
ksrc_deps := $(addsuffix .d,$(ksrc_files))
@@
-36,12
+39,12
@@
CFLAGS += -include flags.h
@$(CC) $(CFLAGS) $(kinc_opts) -c $< -o $@
$(kbin_dir)/modksyms: $(kbin)
@$(CC) $(CFLAGS) $(kinc_opts) -c $< -o $@
$(kbin_dir)/modksyms: $(kbin)
- $(call status_,
GEN
,$@)
+ $(call status_,
MOD
,$@)
@$(PY) scripts/syms_export.py --bits=32 --order=little -o "$@" "$<"
.PHONY: __do_relink
__do_relink: $(ksrc_objs)
@$(PY) scripts/syms_export.py --bits=32 --order=little -o "$@" "$<"
.PHONY: __do_relink
__do_relink: $(ksrc_objs)
- $(call status_,LD,$
@
)
+ $(call status_,LD,$
(kbin)
)
@$(CC) -T link/linker.ld -o $(kbin) $(ksrc_objs) $(LDFLAGS)
.PHONY: all
@$(CC) -T link/linker.ld -o $(kbin) $(ksrc_objs) $(LDFLAGS)
.PHONY: all