Makefile 1.2 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 6
# Licensed under the GPL
#

extra-y := vmlinux.lds
7
clean-files :=
L
Linus Torvalds 已提交
8

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

J
Jeff Dike 已提交
14
obj-$(CONFIG_BLK_DEV_INITRD) += initrd.o
L
Linus Torvalds 已提交
15 16 17
obj-$(CONFIG_GPROF)	+= gprof_syms.o
obj-$(CONFIG_GCOV)	+= gmon_syms.o

18
USER_OBJS := config.o
L
Linus Torvalds 已提交
19 20 21

include arch/um/scripts/Makefile.rules

22
targets := config.c config.tmp
L
Linus Torvalds 已提交
23 24 25 26 27 28 29 30

# 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   $@
31
      cmd_quote1 = sed -e 's/"/\\"/g' -e 's/^/"/' -e 's/$$/\\n",/' \
L
Linus Torvalds 已提交
32 33 34 35 36 37 38
		   $< > $@

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

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