1 1.3.2.2 tls # $NetBSD: Makefile.aarch64,v 1.3.2.2 2014/08/20 00:02:39 tls Exp $ 2 1.3.2.2 tls 3 1.3.2.2 tls # Makefile for NetBSD 4 1.3.2.2 tls # 5 1.3.2.2 tls # This makefile is constructed from a machine description: 6 1.3.2.2 tls # config machineid 7 1.3.2.2 tls # Most changes should be made in the machine description 8 1.3.2.2 tls # /sys/arch/<arch>/conf/``machineid'' 9 1.3.2.2 tls # after which you should do 10 1.3.2.2 tls # config machineid 11 1.3.2.2 tls # Machine generic makefile changes should be made in 12 1.3.2.2 tls # /sys/arch/arm/conf/Makefile.arm 13 1.3.2.2 tls # after which config should be rerun for all machines of that type. 14 1.3.2.2 tls # 15 1.3.2.2 tls # To specify debugging, add the config line: makeoptions DEBUG="-g" 16 1.3.2.2 tls # A better way is to specify -g only for a few files. 17 1.3.2.2 tls # 18 1.3.2.2 tls # makeoptions DEBUGLIST="uvm* trap if_*" 19 1.3.2.2 tls 20 1.3.2.2 tls USETOOLS?= no 21 1.3.2.2 tls NEED_OWN_INSTALL_TARGET?=no 22 1.3.2.2 tls .include <bsd.own.mk> 23 1.3.2.2 tls 24 1.3.2.2 tls ## 25 1.3.2.2 tls ## (1) port identification 26 1.3.2.2 tls ## 27 1.3.2.2 tls THISA64= $S/arch/${MACHINE} 28 1.3.2.2 tls A64= $S/arch/aarch64 29 1.3.2.2 tls GENASSYM_CONF= ${A64}/aarch64/genassym.cf 30 1.3.2.2 tls .-include "$S/arch/${MACHINE}/conf/Makefile.${MACHINE}.inc" 31 1.3.2.2 tls 32 1.3.2.2 tls ## 33 1.3.2.2 tls ## (2) compile settings 34 1.3.2.2 tls ## 35 1.3.2.2 tls # CPPFLAGS set by platform-specific Makefile fragment. 36 1.3.2.2 tls CFLAGS+= -fomit-frame-pointer 37 1.3.2.2 tls 38 1.3.2.2 tls ## 39 1.3.2.2 tls ## (3) libkern and compat 40 1.3.2.2 tls ## 41 1.3.2.2 tls KERN_AS= obj 42 1.3.2.2 tls 43 1.3.2.2 tls ## 44 1.3.2.2 tls ## (4) local objects, compile rules, and dependencies 45 1.3.2.2 tls ## 46 1.3.2.2 tls MD_OBJS+= ${SYSTEM_FIRST_OBJ} locore.o 47 1.3.2.2 tls MD_CFILES+= 48 1.3.2.2 tls MD_SFILES+= ${SYSTEM_FIRST_SFILE} ${A64}/aarch64/locore.S 49 1.3.2.2 tls 50 1.3.2.2 tls .if defined(SYSTEM_FIRST_OBJ) 51 1.3.2.2 tls ${SYSTEM_FIRST_OBJ}: ${SYSTEM_FIRST_SFILE} assym.h 52 1.3.2.2 tls ${NORMAL_S} 53 1.3.2.2 tls .endif 54 1.3.2.2 tls 55 1.3.2.2 tls locore.o: ${A64}/aarch64/locore.S assym.h 56 1.3.2.2 tls ${NORMAL_S} 57 1.3.2.2 tls 58 1.3.2.2 tls ## 59 1.3.2.2 tls ## (5) link settings 60 1.3.2.2 tls ## 61 1.3.2.2 tls LDSCRIPT?= ${A64}/conf/kern.ldscript 62 1.3.2.2 tls LOADADDRESS?= 0xFFFFFFFF00000000 63 1.3.2.2 tls LINKFLAGS_NORMAL= -X 64 1.3.2.2 tls .if "${LDSCRIPT}" != "" 65 1.3.2.2 tls LINKFLAGS_NORMAL+= -T ${LDSCRIPT} 66 1.3.2.2 tls .endif 67 1.3.2.2 tls 68 1.3.2.2 tls # Strip AArch64 mapping symbols from the kernel image, as they interfere 69 1.3.2.2 tls # with ddb. Do it differently if 'makeoptions DEBUG="-g"' was specified. 70 1.3.2.2 tls .if !defined(DEBUG) || empty(DEBUG:M-g*) 71 1.3.2.2 tls SYSTEM_LD_TAIL?= ${SYSTEM_LD_TAIL_DBSYM}; \ 72 1.3.2.2 tls ${OBJCOPY} --strip-symbol='$$k' \ 73 1.3.2.2 tls --strip-symbol='$$d' $@ ;\ 74 1.3.2.2 tls ${SIZE} $@; chmod 755 $@ 75 1.3.2.2 tls .else 76 1.3.2.2 tls STRIPFLAGS=-g --strip-symbol='$$x' --strip-symbol='$$d' 77 1.3.2.2 tls .endif 78 1.3.2.2 tls 79 1.3.2.2 tls ## 80 1.3.2.2 tls ## (6) port specific target dependencies 81 1.3.2.2 tls ## 82 1.3.2.2 tls 83 1.3.2.2 tls # depend on DIAGNOSTIC etc. 84 1.3.2.2 tls cpuswitch.o fault.o machdep.o: Makefile 85 1.3.2.2 tls 86 1.3.2.2 tls # various assembly files that depend on assym.h 87 1.3.2.2 tls atomic.o bcopy_page.o bcopyinout.o copystr.o cpuswitch.o cpu_in_cksum.o: assym.h 88 1.3.2.2 tls exception.o sigcode.o: assym.h 89 1.3.2.2 tls spl.o vectors.o: assym.h 90 1.3.2.2 tls 91 1.3.2.2 tls ## 92 1.3.2.2 tls ## (7) misc settings 93 1.3.2.2 tls ## 94 1.3.2.2 tls 95 1.3.2.2 tls ## 96 1.3.2.2 tls ## (8) config(8) generated machinery 97 1.3.2.2 tls ## 98 1.3.2.2 tls %INCLUDES 99 1.3.2.2 tls 100 1.3.2.2 tls %OBJS 101 1.3.2.2 tls 102 1.3.2.2 tls %CFILES 103 1.3.2.2 tls 104 1.3.2.2 tls %SFILES 105 1.3.2.2 tls 106 1.3.2.2 tls %LOAD 107 1.3.2.2 tls 108 1.3.2.2 tls %RULES 109 1.3.2.2 tls 110 1.3.2.2 tls ## 111 1.3.2.2 tls ## (9) after the config file is inserted 112 1.3.2.2 tls ## 113 1.3.2.2 tls 114 1.3.2.2 tls ## 115 1.3.2.2 tls ## (10) port independent kernel machinery 116 1.3.2.2 tls ## 117 1.3.2.2 tls 118 1.3.2.2 tls .include "$S/conf/Makefile.kern.inc" 119 1.3.2.2 tls 120 1.3.2.2 tls ## 121 1.3.2.2 tls ## (11) Appending make options. 122 1.3.2.2 tls ## 123 1.3.2.2 tls %MAKEOPTIONSAPPEND 124