1*0d1fb0a4SAlex Dewar# SPDX-License-Identifier: GPL-2.0 21da177e4SLinus Torvalds# 34c9e1385SJeff Dike# Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux,intel}.com) 41da177e4SLinus Torvalds# 51da177e4SLinus Torvalds 6915eed20SVegard Nossum# Don't instrument UML-specific code; without this, we may crash when 7915eed20SVegard Nossum# accessing the instrumentation buffer for the first time from the 8915eed20SVegard Nossum# kernel. 9915eed20SVegard NossumKCOV_INSTRUMENT := n 10915eed20SVegard Nossum 11dc5be20aSAl ViroCPPFLAGS_vmlinux.lds := -DSTART=$(LDS_START) \ 1251b563fcSSam Ravnborg -DELF_ARCH=$(LDS_ELF_ARCH) \ 133cb42092SAl Viro -DELF_FORMAT=$(LDS_ELF_FORMAT) \ 143cb42092SAl Viro $(LDS_EXTRA) 151da177e4SLinus Torvaldsextra-y := vmlinux.lds 161da177e4SLinus Torvalds 175b408241SThomas Gleixnerobj-y = config.o exec.o exitcode.o irq.o ksyms.o mem.o \ 18b42e1eacSJeff Dike physmem.o process.o ptrace.o reboot.o sigio.o \ 1928fa468fSRichard Weinberger signal.o syscall.o sysrq.o time.o tlb.o trap.o \ 2004a41849SThomas Meyer um_arch.o umid.o maccess.o kmsg_dump.o skas/ 211da177e4SLinus Torvalds 229b67a3c4SJeff Dikeobj-$(CONFIG_BLK_DEV_INITRD) += initrd.o 231da177e4SLinus Torvaldsobj-$(CONFIG_GPROF) += gprof_syms.o 241da177e4SLinus Torvaldsobj-$(CONFIG_GCOV) += gmon_syms.o 25d634f194SRichard Weinbergerobj-$(CONFIG_EARLY_PRINTK) += early_printk.o 26970e51feSDaniel Walterobj-$(CONFIG_STACKTRACE) += stacktrace.o 271da177e4SLinus Torvalds 28c554f899SJeff DikeUSER_OBJS := config.o 291da177e4SLinus Torvalds 301da177e4SLinus Torvaldsinclude arch/um/scripts/Makefile.rules 311da177e4SLinus Torvalds 32776cfebbSPaolo 'Blaisorblade' Giarrussotargets := config.c config.tmp 331da177e4SLinus Torvalds 341da177e4SLinus Torvalds# Be careful with the below Sed code - sed is pitfall-rich! 351da177e4SLinus Torvalds# We use sed to lower build requirements, for "embedded" builders for instance. 361da177e4SLinus Torvalds 371da177e4SLinus Torvalds$(obj)/config.tmp: $(objtree)/.config FORCE 381da177e4SLinus Torvalds $(call if_changed,quote1) 391da177e4SLinus Torvalds 401da177e4SLinus Torvaldsquiet_cmd_quote1 = QUOTE $@ 41dc717687SWANG Cong cmd_quote1 = sed -e 's/"/\\"/g' -e 's/^/"/' -e 's/$$/\\n",/' \ 421da177e4SLinus Torvalds $< > $@ 431da177e4SLinus Torvalds 441da177e4SLinus Torvalds$(obj)/config.c: $(src)/config.c.in $(obj)/config.tmp FORCE 451da177e4SLinus Torvalds $(call if_changed,quote2) 461da177e4SLinus Torvalds 471da177e4SLinus Torvaldsquiet_cmd_quote2 = QUOTE $@ 481da177e4SLinus Torvalds cmd_quote2 = sed -e '/CONFIG/{' \ 49dc717687SWANG Cong -e 's/"CONFIG"//' \ 501da177e4SLinus Torvalds -e 'r $(obj)/config.tmp' \ 51b05d85a8SRob Landley -e 'a \' \ 52dc717687SWANG Cong -e '""' \ 531da177e4SLinus Torvalds -e '}' \ 541da177e4SLinus Torvalds $< > $@ 55