1*1da177e4SLinus Torvalds# 2*1da177e4SLinus Torvalds# Copyright (C) 2002 Jeff Dike (jdike@karaya.com) 3*1da177e4SLinus Torvalds# Licensed under the GPL 4*1da177e4SLinus Torvalds# 5*1da177e4SLinus Torvalds 6*1da177e4SLinus Torvaldsextra-y := vmlinux.lds 7*1da177e4SLinus Torvaldsclean-files := vmlinux.lds.S config.tmp 8*1da177e4SLinus Torvalds 9*1da177e4SLinus Torvaldsobj-y = checksum.o config.o exec_kern.o exitcode.o \ 10*1da177e4SLinus Torvalds helper.o init_task.o irq.o irq_user.o ksyms.o main.o mem.o mem_user.o \ 11*1da177e4SLinus Torvalds physmem.o process.o process_kern.o ptrace.o reboot.o resource.o \ 12*1da177e4SLinus Torvalds sigio_user.o sigio_kern.o signal_kern.o signal_user.o smp.o \ 13*1da177e4SLinus Torvalds syscall_kern.o sysrq.o sys_call_table.o tempfile.o time.o time_kern.o \ 14*1da177e4SLinus Torvalds tlb.o trap_kern.o trap_user.o uaccess_user.o um_arch.o umid.o \ 15*1da177e4SLinus Torvalds user_util.o 16*1da177e4SLinus Torvalds 17*1da177e4SLinus Torvaldsobj-$(CONFIG_BLK_DEV_INITRD) += initrd_kern.o initrd_user.o 18*1da177e4SLinus Torvaldsobj-$(CONFIG_GPROF) += gprof_syms.o 19*1da177e4SLinus Torvaldsobj-$(CONFIG_GCOV) += gmon_syms.o 20*1da177e4SLinus Torvaldsobj-$(CONFIG_TTY_LOG) += tty_log.o 21*1da177e4SLinus Torvaldsobj-$(CONFIG_SYSCALL_DEBUG) += syscall_user.o 22*1da177e4SLinus Torvalds 23*1da177e4SLinus Torvaldsobj-$(CONFIG_MODE_TT) += tt/ 24*1da177e4SLinus Torvaldsobj-$(CONFIG_MODE_SKAS) += skas/ 25*1da177e4SLinus Torvalds 26*1da177e4SLinus Torvalds# This needs be compiled with frame pointers regardless of how the rest of the 27*1da177e4SLinus Torvalds# kernel is built. 28*1da177e4SLinus TorvaldsCFLAGS_frame.o := -fno-omit-frame-pointer 29*1da177e4SLinus Torvalds 30*1da177e4SLinus Torvaldsuser-objs-$(CONFIG_TTY_LOG) += tty_log.o 31*1da177e4SLinus Torvalds 32*1da177e4SLinus TorvaldsUSER_OBJS := $(user-objs-y) config.o helper.o main.o process.o tempfile.o \ 33*1da177e4SLinus Torvalds time.o tty_log.o umid.o user_util.o frame.o 34*1da177e4SLinus Torvalds 35*1da177e4SLinus Torvaldsinclude arch/um/scripts/Makefile.rules 36*1da177e4SLinus Torvalds 37*1da177e4SLinus Torvaldstargets += config.c 38*1da177e4SLinus Torvalds 39*1da177e4SLinus Torvalds# Be careful with the below Sed code - sed is pitfall-rich! 40*1da177e4SLinus Torvalds# We use sed to lower build requirements, for "embedded" builders for instance. 41*1da177e4SLinus Torvalds 42*1da177e4SLinus Torvalds$(obj)/config.tmp: $(objtree)/.config FORCE 43*1da177e4SLinus Torvalds $(call if_changed,quote1) 44*1da177e4SLinus Torvalds 45*1da177e4SLinus Torvaldsquiet_cmd_quote1 = QUOTE $@ 46*1da177e4SLinus Torvalds cmd_quote1 = sed -e 's/"/\\"/g' -e 's/^/"/' -e 's/$$/\\n"/' \ 47*1da177e4SLinus Torvalds $< > $@ 48*1da177e4SLinus Torvalds 49*1da177e4SLinus Torvalds$(obj)/config.c: $(src)/config.c.in $(obj)/config.tmp FORCE 50*1da177e4SLinus Torvalds $(call if_changed,quote2) 51*1da177e4SLinus Torvalds 52*1da177e4SLinus Torvaldsquiet_cmd_quote2 = QUOTE $@ 53*1da177e4SLinus Torvalds cmd_quote2 = sed -e '/CONFIG/{' \ 54*1da177e4SLinus Torvalds -e 's/"CONFIG"\;/""/' \ 55*1da177e4SLinus Torvalds -e 'r $(obj)/config.tmp' \ 56*1da177e4SLinus Torvalds -e 'a""\;' \ 57*1da177e4SLinus Torvalds -e '}' \ 58*1da177e4SLinus Torvalds $< > $@ 59