summaryrefslogtreecommitdiff
path: root/scripts/mod
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/mod')
-rw-r--r--scripts/mod/Makefile16
-rw-r--r--scripts/mod/file2alias.c2
2 files changed, 17 insertions, 1 deletions
diff --git a/scripts/mod/Makefile b/scripts/mod/Makefile
new file mode 100644
index 000000000000..f66bf5262aae
--- /dev/null
+++ b/scripts/mod/Makefile
@@ -0,0 +1,16 @@
+host-progs := modpost mk_elfconfig
+always := $(host-progs) empty.o
+
+modpost-objs := modpost.o file2alias.o sumversion.o
+
+# dependencies on generated files need to be listed explicitly
+
+$(obj)/modpost.o $(obj)/file2alias.o $(obj)/sumversion.o: $(obj)/elfconfig.h
+
+quiet_cmd_elfconfig = MKELF $@
+ cmd_elfconfig = $(obj)/mk_elfconfig $(ARCH) < $< > $@
+
+$(obj)/elfconfig.h: $(obj)/empty.o $(obj)/mk_elfconfig FORCE
+ $(call if_changed,elfconfig)
+
+targets += elfconfig.h
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index fa8fd160b2b8..f38c6d7def2a 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -27,7 +27,7 @@ typedef unsigned char __u8;
/* Big exception to the "don't include kernel headers into userspace, which
* even potentially has different endianness and word sizes, since
* we handle those differences explicitly below */
-#include "../include/linux/mod_devicetable.h"
+#include "../../include/linux/mod_devicetable.h"
#define ADD(str, sep, cond, field) \
do { \