mtw(4) remove misplaced DEBUG_FLAGS
[freebsd/src.git] / sys / conf / Makefile.riscv
blob12d8e62e1b9a276e6e70fd640b113e7ca43b7a56
1 # Makefile.riscv -- with config changes.
2 # Copyright 1990 W. Jolitz
3 #       from FreeBSD: src/sys/conf/Makefile.i386,v 1.255 2002/02/20 23:35:49
5 # Makefile for FreeBSD
7 # RISCVTODO: copy pasted from aarch64, needs to be
8 # constructed from a machine description:
9 #       config machineid
10 # Most changes should be made in the machine description
11 #       /sys/riscv/conf/``machineid''
12 # after which you should do
13 #        config machineid
14 # Generic makefile changes should be made in
15 #       /sys/conf/Makefile.riscv
16 # after which config should be rerun for all machines.
19 # Which version of config(8) is required.
20 %VERSREQ=       600012
22 .if !defined(S)
23 S=      ../../..
24 .endif
25 .include "$S/conf/kern.pre.mk"
27 INCLUDES+= -I$S/contrib/libfdt -I$S/contrib/device-tree/include
29 # Set the ELF LMA to the address that OpenSBI's fw_jump jumps to. This allows
30 # us to load the kernel with the -kernel flag in QEMU without having to embed
31 # it inside BBL or OpenSBI's fw_payload first.
32 # Note: For rv32 the start address is different (0x80400000).
33 # We set this value using --defsym rather than hardcoding it in ldscript.riscv
34 # so that different kernel configs can override the load address.
35 KERNEL_LMA?=    0x80200000
36 LDFLAGS+= --defsym='kernel_lma=${KERNEL_LMA}'
38 .if !empty(DDB_ENABLED) || !empty(DTRACE_ENABLED) || !empty(HWPMC_ENABLED)
39 CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
40 .endif
42 %BEFORE_DEPEND
44 %OBJS
46 %FILES.c
48 %FILES.s
50 %FILES.m
52 %CLEAN
54 %RULES
56 .include "$S/conf/kern.post.mk"