Makefile 1.5 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
#

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

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

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

24
USER_OBJS := config.o
L
Linus Torvalds 已提交
25 26 27

include arch/um/scripts/Makefile.rules

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

# 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   $@
37
      cmd_quote1 = sed -e 's/"/\\"/g' -e 's/^/"/' -e 's/$$/\\n",/' \
L
Linus Torvalds 已提交
38 39 40 41 42 43 44
		   $< > $@

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

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