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