From 8e550f7093050594481fdfa9c329677b7cefdde9 Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Thu, 28 May 2015 19:23:36 +0200 Subject: [PATCH 1/2] 'Kbuild' is a common makefile name. --- lib/linguist/languages.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 57c6e8f18b..f5382016b5 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1881,6 +1881,7 @@ Makefile: - .mk filenames: - GNUmakefile + - Kbuild - Makefile - makefile interpreters: From 21e249bd2c207e584fedd54618b2e3b5936883e9 Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Fri, 29 May 2015 09:04:14 +0200 Subject: [PATCH 2/2] Add makefile sample. Kbuild by Sam Ravnborg; GPL 2 license. --- samples/Makefile/filenames/Kbuild | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 samples/Makefile/filenames/Kbuild diff --git a/samples/Makefile/filenames/Kbuild b/samples/Makefile/filenames/Kbuild new file mode 100644 index 0000000000..dd29533589 --- /dev/null +++ b/samples/Makefile/filenames/Kbuild @@ -0,0 +1,23 @@ +# Fail on warnings - also for files referenced in subdirs +# -Werror can be disabled for specific files using: +# CFLAGS_ := -Wno-error +subdir-ccflags-y := -Werror + +# platform specific definitions +include arch/mips/Kbuild.platforms +obj-y := $(platform-y) + +# make clean traverses $(obj-) without having included .config, so +# everything ends up here +obj- := $(platform-) + +# mips object files +# The object files are linked as core-y files would be linked + +obj-y += kernel/ +obj-y += mm/ +obj-y += net/ + +ifdef CONFIG_KVM +obj-y += kvm/ +endif