]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/conf/Makefile.arm
Really detect if DDB is enabled.
[FreeBSD/FreeBSD.git] / sys / conf / Makefile.arm
1 # Makefile.arm -- with config changes.
2 # Copyright 1990 W. Jolitz
3 #       from: @(#)Makefile.i386 7.1 5/10/91
4 # $FreeBSD$
5 #
6 # Makefile for FreeBSD
7 #
8 # This makefile is constructed from a machine description:
9 #       config machineid
10 # Most changes should be made in the machine description
11 #       /sys/arm/conf/``machineid''
12 # after which you should do
13 #        config machineid
14 # Generic makefile changes should be made in
15 #       /sys/conf/Makefile.arm
16 # after which config should be rerun for all machines.
17 #
18
19 # Which version of config(8) is required.
20 %VERSREQ=       600002
21
22 # Temporary stuff while we're still embryonic
23 NO_MODULES=
24
25 STD8X16FONT?=   iso
26
27 .if !defined(S)
28 .if exists(./@/.)
29 S=      ./@
30 .else
31 S=      ../../..
32 .endif
33 .endif
34 .include "$S/conf/kern.pre.mk"
35
36 SYSTEM_LD:= ${SYSTEM_LD:$S/conf/ldscript.$M=ldscript.$M}
37 SYSTEM_DEP:= ${SYSTEM_DEP:$S/conf/ldscript.$M=ldscript.$M}
38
39 .if defined(ARM_BIG_ENDIAN)
40 CC += -mbig-endian
41 SYSTEM_LD += -EB
42 .endif
43
44 .if !defined(DEBUG)
45 CFLAGS += -mno-apcs-frame
46 .endif
47
48 DDB_ENABLED!=   grep DDB opt_ddb.h || true
49
50 .if ${DDB_ENABLED} != ""
51 SYSTEM_LD_TAIL += ;echo "\#define KERNNAME \"${KERNEL_KO}\"" >opt_kernname.h ; \
52         ${CC} -O -nostdlib -I. -Xlinker -T -Xlinker ldscript.arm \
53         $S/$M/$M/elf_trampoline.c $S/$M/$M/inckern.S -o ${KERNEL_KO}.tramp
54 .endif
55
56 %BEFORE_DEPEND
57
58 %OBJS
59
60 %FILES.c
61
62 %FILES.s
63
64 %FILES.m
65
66 %CLEAN
67
68 .if ${DDB_ENABLED} != ""
69 CLEAN+= kernel.tramp
70 .endif
71 ldscript.$M: $S/conf/ldscript.$M
72         cat $S/conf/ldscript.$M|sed s/KERNPHYSADDR/${KERNPHYSADDR}/g| \
73           sed s/KERNVIRTADDR/${KERNVIRTADDR}/g > ldscript.$M
74 %RULES
75         
76 .include "$S/conf/kern.post.mk"