File: Makefile

package info (click to toggle)
kernel-patch-kdb 2.1-3-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 4,900 kB
  • ctags: 421
  • sloc: ansic: 3,819; makefile: 74
file content (20 lines) | stat: -rw-r--r-- 694 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
O_TARGET	:= kdb.o
export-objs	:= kdbmain.o kdb_io.o
obj-y		:= kdb_bt.o kdb_bp.o kdb_id.o kdbsupport.o gen-kdb_cmds.o kdbmain.o kdb_io.o

subdir-$(CONFIG_KDB_MODULES) := modules
obj-y += $(addsuffix /vmlinux-obj.o, $(subdir-y))

override CFLAGS := $(CFLAGS:%-pg=% )

EXTRA_CFLAGS += -I $(TOPDIR)/arch/$(ARCH)/kdb

include $(TOPDIR)/Rules.make

gen-kdb_cmds.c:	kdb_cmds Makefile
	$(AWK) 'BEGIN {print "#include <linux/init.h>"} \
		/^ *#/{next} \
		/^[ \t]*$$/{next} \
		{print "static __initdata char kdb_cmd" cmds++ "[] = \"" $$0 "\\n\";"} \
		END {print "char __initdata *kdb_cmds[] = {"; for (i = 0; i < cmds; ++i) {print "  kdb_cmd" i ","}; print("  0\n};");}' \
		kdb_cmds > gen-kdb_cmds.c