Makefile 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # SPDX-License-Identifier: GPL-2.0
  2. #
  3. # Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux,intel}.com)
  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. obj-y = config.o exec.o exitcode.o irq.o ksyms.o mem.o \
  15. physmem.o process.o ptrace.o reboot.o sigio.o \
  16. signal.o syscall.o sysrq.o time.o tlb.o trap.o \
  17. um_arch.o umid.o maccess.o kmsg_dump.o skas/
  18. obj-$(CONFIG_BLK_DEV_INITRD) += initrd.o
  19. obj-$(CONFIG_GPROF) += gprof_syms.o
  20. obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
  21. obj-$(CONFIG_STACKTRACE) += stacktrace.o
  22. USER_OBJS := config.o
  23. include arch/um/scripts/Makefile.rules
  24. targets := config.c config.tmp
  25. # Be careful with the below Sed code - sed is pitfall-rich!
  26. # We use sed to lower build requirements, for "embedded" builders for instance.
  27. $(obj)/config.tmp: $(objtree)/.config FORCE
  28. $(call if_changed,quote1)
  29. quiet_cmd_quote1 = QUOTE $@
  30. cmd_quote1 = sed -e 's/"/\\"/g' -e 's/^/"/' -e 's/$$/\\n",/' \
  31. $< > $@
  32. $(obj)/config.c: $(src)/config.c.in $(obj)/config.tmp FORCE
  33. $(call if_changed,quote2)
  34. quiet_cmd_quote2 = QUOTE $@
  35. cmd_quote2 = sed -e '/CONFIG/{' \
  36. -e 's/"CONFIG"//' \
  37. -e 'r $(obj)/config.tmp' \
  38. -e 'a \' \
  39. -e '""' \
  40. -e '}' \
  41. $< > $@