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 \
J
Jeff Dike 已提交
14
	signal.o smp.o syscall.o sysrq.o time.o tlb.o trap.o uaccess.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 20
obj-$(CONFIG_GPROF)	+= gprof_syms.o
obj-$(CONFIG_GCOV)	+= gmon_syms.o

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

include arch/um/scripts/Makefile.rules

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

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

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

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