Makefile 1.5 KB

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