2 # This file is subject to the terms and conditions of the GNU General Public
3 # License. See the file "COPYING" in the main directory of this archive
6 # Copyright (c) 1999-2004 Silicon Graphics, Inc. All Rights Reserved.
9 obj-y := kdb_bt.o kdb_bp.o kdb_id.o kdbsupport.o gen-kdb_cmds.o kdbmain.o kdb_io.o
11 subdir-$(CONFIG_KDB_MODULES) := modules
12 obj-y += $(addsuffix /built-in.o, $(subdir-y))
14 clean-files := gen-kdb_cmds.c
16 override CFLAGS := $(CFLAGS:%-pg=% )
18 quiet_cmd_gen-kdb = GENKDB $@
19 cmd_gen-kdb = $(AWK) 'BEGIN {print "\#include <linux/init.h>"} \
22 {gsub(/"/, "\\\"", $$0); \
23 print "static __initdata char kdb_cmd" cmds++ "[] = \"" $$0 "\\n\";"} \
24 END {print "char __initdata *kdb_cmds[] = {"; for (i = 0; i < cmds; ++i) {print " kdb_cmd" i ","}; print(" 0\n};");}' \
25 $(filter-out %/Makefile,$^) > $@
27 $(obj)/gen-kdb_cmds.c: $(src)/kdb_cmds $(wildcard $(TOPDIR)/arch/$(ARCH)/kdb/kdb_cmds) $(src)/Makefile