diff options
Diffstat (limited to 'kernel/debug/kdb/Makefile')
| -rw-r--r-- | kernel/debug/kdb/Makefile | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/kernel/debug/kdb/Makefile b/kernel/debug/kdb/Makefile new file mode 100644 index 000000000000..d4fc58f4b88d --- /dev/null +++ b/kernel/debug/kdb/Makefile | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | # This file is subject to the terms and conditions of the GNU General Public | ||
| 2 | # License. See the file "COPYING" in the main directory of this archive | ||
| 3 | # for more details. | ||
| 4 | # | ||
| 5 | # Copyright (c) 1999-2004 Silicon Graphics, Inc. All Rights Reserved. | ||
| 6 | # Copyright (c) 2009 Wind River Systems, Inc. All Rights Reserved. | ||
| 7 | # | ||
| 8 | |||
| 9 | CCVERSION := $(shell $(CC) -v 2>&1 | sed -ne '$$p') | ||
| 10 | obj-y := kdb_io.o kdb_main.o kdb_support.o kdb_bt.o gen-kdb_cmds.o kdb_bp.o kdb_debugger.o | ||
| 11 | obj-$(CONFIG_KDB_KEYBOARD) += kdb_keyboard.o | ||
| 12 | |||
| 13 | clean-files := gen-kdb_cmds.c | ||
| 14 | |||
| 15 | quiet_cmd_gen-kdb = GENKDB $@ | ||
| 16 | cmd_gen-kdb = $(AWK) 'BEGIN {print "\#include <linux/stddef.h>"; print "\#include <linux/init.h>"} \ | ||
| 17 | /^\#/{next} \ | ||
| 18 | /^[ \t]*$$/{next} \ | ||
| 19 | {gsub(/"/, "\\\"", $$0); \ | ||
| 20 | print "static __initdata char kdb_cmd" cmds++ "[] = \"" $$0 "\\n\";"} \ | ||
| 21 | END {print "extern char *kdb_cmds[]; char __initdata *kdb_cmds[] = {"; for (i = 0; i < cmds; ++i) {print " kdb_cmd" i ","}; print(" NULL\n};");}' \ | ||
| 22 | $(filter-out %/Makefile,$^) > $@# | ||
| 23 | |||
| 24 | $(obj)/gen-kdb_cmds.c: $(src)/kdb_cmds $(src)/Makefile | ||
| 25 | $(call cmd,gen-kdb) | ||
