Makefile 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #
  2. # Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux,intel}.com)
  3. # Licensed under the GPL
  4. #
  5. # Don't instrument UML-specific code; without this, we may crash when
  6. # accessing the instrumentation buffer for the first time from the
  7. # kernel.
  8. KCOV_INSTRUMENT := n
  9. CPPFLAGS_vmlinux.lds := -DSTART=$(LDS_START) \
  10. -DELF_ARCH=$(LDS_ELF_ARCH) \
  11. -DELF_FORMAT=$(LDS_ELF_FORMAT) \
  12. $(LDS_EXTRA)
  13. extra-y := vmlinux.lds
  14. clean-files :=
  15. obj-y = config.o exec.o exitcode.o irq.o ksyms.o mem.o \
  16. physmem.o process.o ptrace.o reboot.o sigio.o \
  17. signal.o syscall.o sysrq.o time.o tlb.o trap.o \
  18. um_arch.o umid.o maccess.o kmsg_dump.o skas/
  19. obj-$(CONFIG_BLK_DEV_INITRD) += initrd.o
  20. obj-$(CONFIG_GPROF) += gprof_syms.o
  21. obj-$(CONFIG_GCOV) += gmon_syms.o
  22. obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
  23. obj-$(CONFIG_STACKTRACE) += stacktrace.o
  24. USER_OBJS := config.o
  25. include arch/um/scripts/Makefile.rules
  26. targets := config.c config.tmp
  27. # Be careful with the below Sed code - sed is pitfall-rich!
  28. # We use sed to lower build requirements, for "embedded" builders for instance.
  29. $(obj)/config.tmp: $(objtree)/.config FORCE
  30. $(call if_changed,quote1)
  31. quiet_cmd_quote1 = QUOTE $@
  32. cmd_quote1 = sed -e 's/"/\\"/g' -e 's/^/"/' -e 's/$$/\\n",/' \
  33. $< > $@
  34. $(obj)/config.c: $(src)/config.c.in $(obj)/config.tmp FORCE
  35. $(call if_changed,quote2)
  36. quiet_cmd_quote2 = QUOTE $@
  37. cmd_quote2 = sed -e '/CONFIG/{' \
  38. -e 's/"CONFIG"//' \
  39. -e 'r $(obj)/config.tmp' \
  40. -e 'a \' \
  41. -e '""' \
  42. -e '}' \
  43. $< > $@