Commit | Line | Data |
---|---|---|
114069f7 | 1 | # |
4c9e1385 | 2 | # Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux,intel}.com) |
1da177e4 LT |
3 | # Licensed under the GPL |
4 | # | |
5 | ||
3cb42092 AV |
6 | CPPFLAGS_vmlinux.lds := -DSTART=$(LDS_START) \ |
7 | -DELF_ARCH=$(LDS_ELF_ARCH) \ | |
8 | -DELF_FORMAT=$(LDS_ELF_FORMAT) \ | |
9 | $(LDS_EXTRA) | |
1da177e4 | 10 | extra-y := vmlinux.lds |
03f81dc5 | 11 | clean-files := |
1da177e4 | 12 | |
5b408241 | 13 | obj-y = config.o exec.o exitcode.o irq.o ksyms.o mem.o \ |
b42e1eac | 14 | physmem.o process.o ptrace.o reboot.o sigio.o \ |
5d40de0f | 15 | signal.o smp.o syscall.o sysrq.o time.o tlb.o trap.o \ |
4fdaa3d4 | 16 | um_arch.o umid.o maccess.o skas/ |
1da177e4 | 17 | |
9b67a3c4 | 18 | obj-$(CONFIG_BLK_DEV_INITRD) += initrd.o |
1da177e4 LT |
19 | obj-$(CONFIG_GPROF) += gprof_syms.o |
20 | obj-$(CONFIG_GCOV) += gmon_syms.o | |
d634f194 | 21 | obj-$(CONFIG_EARLY_PRINTK) += early_printk.o |
1da177e4 | 22 | |
c554f899 | 23 | USER_OBJS := config.o |
1da177e4 LT |
24 | |
25 | include arch/um/scripts/Makefile.rules | |
26 | ||
776cfebb | 27 | targets := config.c config.tmp |
1da177e4 LT |
28 | |
29 | # Be careful with the below Sed code - sed is pitfall-rich! | |
30 | # We use sed to lower build requirements, for "embedded" builders for instance. | |
31 | ||
32 | $(obj)/config.tmp: $(objtree)/.config FORCE | |
33 | $(call if_changed,quote1) | |
34 | ||
35 | quiet_cmd_quote1 = QUOTE $@ | |
dc717687 | 36 | cmd_quote1 = sed -e 's/"/\\"/g' -e 's/^/"/' -e 's/$$/\\n",/' \ |
1da177e4 LT |
37 | $< > $@ |
38 | ||
39 | $(obj)/config.c: $(src)/config.c.in $(obj)/config.tmp FORCE | |
40 | $(call if_changed,quote2) | |
41 | ||
42 | quiet_cmd_quote2 = QUOTE $@ | |
43 | cmd_quote2 = sed -e '/CONFIG/{' \ | |
dc717687 | 44 | -e 's/"CONFIG"//' \ |
1da177e4 | 45 | -e 'r $(obj)/config.tmp' \ |
b05d85a8 | 46 | -e 'a \' \ |
dc717687 | 47 | -e '""' \ |
1da177e4 LT |
48 | -e '}' \ |
49 | $< > $@ |