Makefile 1.4 KB
Newer Older
1
#
J
Jeff Dike 已提交
2
# Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux,intel}.com)
L
Linus Torvalds 已提交
3 4 5
# Licensed under the GPL
#

6 7 8
CPPFLAGS_vmlinux.lds := -U$(SUBARCH) -DSTART=$(LDS_START) \
                        -DELF_ARCH=$(LDS_ELF_ARCH)        \
                        -DELF_FORMAT=$(LDS_ELF_FORMAT)
L
Linus Torvalds 已提交
9
extra-y := vmlinux.lds
10
clean-files :=
L
Linus Torvalds 已提交
11

J
Jeff Dike 已提交
12
obj-y = config.o exec.o exitcode.o init_task.o irq.o ksyms.o mem.o \
J
Jeff Dike 已提交
13
	physmem.o process.o ptrace.o reboot.o sigio.o \
A
Al Viro 已提交
14
	signal.o smp.o syscall.o sysrq.o time.o tlb.o trap.o \
J
Jeff Dike 已提交
15
	um_arch.o umid.o skas/
L
Linus Torvalds 已提交
16

J
Jeff Dike 已提交
17
obj-$(CONFIG_BLK_DEV_INITRD) += initrd.o
L
Linus Torvalds 已提交
18 19
obj-$(CONFIG_GPROF)	+= gprof_syms.o
obj-$(CONFIG_GCOV)	+= gmon_syms.o
R
Richard Weinberger 已提交
20
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
L
Linus Torvalds 已提交
21

22
USER_OBJS := config.o
L
Linus Torvalds 已提交
23 24 25

include arch/um/scripts/Makefile.rules

26
targets := config.c config.tmp
L
Linus Torvalds 已提交
27 28 29 30 31 32 33 34

# Be careful with the below Sed code - sed is pitfall-rich!
# We use sed to lower build requirements, for "embedded" builders for instance.

$(obj)/config.tmp: $(objtree)/.config FORCE
	$(call if_changed,quote1)

quiet_cmd_quote1 = QUOTE   $@
35
      cmd_quote1 = sed -e 's/"/\\"/g' -e 's/^/"/' -e 's/$$/\\n",/' \
L
Linus Torvalds 已提交
36 37 38 39 40 41 42
		   $< > $@

$(obj)/config.c: $(src)/config.c.in $(obj)/config.tmp FORCE
	$(call if_changed,quote2)

quiet_cmd_quote2 = QUOTE   $@
      cmd_quote2 = sed -e '/CONFIG/{'          \
43
		  -e 's/"CONFIG"//'            \
L
Linus Torvalds 已提交
44
		  -e 'r $(obj)/config.tmp'     \
45
		  -e 'a \'                     \
46
		  -e '""'                      \
L
Linus Torvalds 已提交
47 48
		  -e '}'                       \
		  $< > $@