-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile.kernel
37 lines (28 loc) · 1.12 KB
/
Makefile.kernel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
include Makefile
# This Makefile can be used to overwrite certain parts of the kernel Makefile
# in this case to add runtimes to KBUILD_VMLINUX_OBJS or LTO passes to KBUILD_LDFLAGS
# used to print the NOSTDINC_FLAGS the kernel is using
.PHONY: print-NOSTDINC_FLAGS
.SILENT:
print-NOSTDINC_FLAGS: ; $(info ${NOSTDINC_FLAGS})
# used to print the LINUXINCLUDE the kernel is using
.PHONY: print-LINUXINCLUDE
.SILENT:
print-LINUXINCLUDE: ; $(info ${LINUXINCLUDE})
# used to print the KBUILD_CFLAGS the kernel is using
.PHONY: print-KBUILD_CFLAGS
.SILENT:
print-KBUILD_CFLAGS: ; $(info ${KBUILD_CFLAGS})
# used to print the KBUILD_LDFLAGS the kernel is using
.PHONY: print-KBUILD_LDFLAGS
.SILENT:
print-KBUILD_LDFLAGS: ; $(info ${KBUILD_LDFLAGS})
ifdef ADDITIONAL_KBUILD_LDFLAGS
KBUILD_LDFLAGS += ${ADDITIONAL_KBUILD_LDFLAGS}
endif
ifdef ADDITIONAL_KBUILD_VMLINUX_OBJS
# use realpath to make sure generate_initcall_order.pl works properly
KBUILD_VMLINUX_OBJS += $(shell realpath --relative-to . $(ADDITIONAL_KBUILD_VMLINUX_OBJS))
export KBUILD_VMLINUX_OBJS
vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_OBJS) $(KBUILD_VMLINUX_LIBS)
endif