Home | History | Annotate | Line # | Download | only in conf
Makefile.aarch64 revision 1.3.2.3
      1  1.3.2.2       tls #	$NetBSD: Makefile.aarch64,v 1.3.2.3 2017/12/03 11:35:43 jdolecek 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.3  jdolecek KERNLDSCRIPT?=	${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 
     65  1.3.2.2       tls # Strip AArch64 mapping symbols from the kernel image, as they interfere
     66  1.3.2.2       tls # with ddb. Do it differently if 'makeoptions DEBUG="-g"' was specified.
     67  1.3.2.2       tls .if !defined(DEBUG) || empty(DEBUG:M-g*)
     68  1.3.2.3  jdolecek SYSTEM_LD_TAIL?=	${OBJCOPY} -w --strip-symbol='[$$][dx]'	\
     69  1.3.2.3  jdolecek 				   --strip-symbol='[$$][dx]\.*' $@ ;\
     70  1.3.2.2       tls 			${SIZE} $@; chmod 755 $@
     71  1.3.2.2       tls .else
     72  1.3.2.2       tls STRIPFLAGS=-g --strip-symbol='$$x' --strip-symbol='$$d'
     73  1.3.2.2       tls .endif
     74  1.3.2.2       tls 
     75  1.3.2.2       tls ##
     76  1.3.2.2       tls ## (6) port specific target dependencies
     77  1.3.2.2       tls ##
     78  1.3.2.2       tls 
     79  1.3.2.2       tls # depend on DIAGNOSTIC etc.
     80  1.3.2.2       tls cpuswitch.o fault.o machdep.o: Makefile
     81  1.3.2.2       tls 
     82  1.3.2.2       tls # various assembly files that depend on assym.h
     83  1.3.2.2       tls atomic.o bcopy_page.o bcopyinout.o copystr.o cpuswitch.o cpu_in_cksum.o: assym.h
     84  1.3.2.2       tls exception.o sigcode.o: assym.h
     85  1.3.2.2       tls spl.o vectors.o: assym.h
     86  1.3.2.2       tls 
     87  1.3.2.2       tls ##
     88  1.3.2.2       tls ## (7) misc settings
     89  1.3.2.2       tls ##
     90  1.3.2.2       tls 
     91  1.3.2.3  jdolecek # define .MAIN _before_ the make() check, so that implicit target
     92  1.3.2.3  jdolecek # would be defined
     93  1.3.2.3  jdolecek .MAIN: all
     94  1.3.2.3  jdolecek 
     95  1.3.2.3  jdolecek .if make(depend) || make(all) || make(dependall)
     96  1.3.2.3  jdolecek .BEGIN:
     97  1.3.2.3  jdolecek 	@rm -f arm && \
     98  1.3.2.3  jdolecek 		ln -s $S/arch/arm/include arm
     99  1.3.2.3  jdolecek .endif
    100  1.3.2.3  jdolecek 
    101  1.3.2.2       tls ##
    102  1.3.2.2       tls ## (8) config(8) generated machinery
    103  1.3.2.2       tls ##
    104  1.3.2.2       tls %INCLUDES
    105  1.3.2.2       tls 
    106  1.3.2.2       tls %OBJS
    107  1.3.2.2       tls 
    108  1.3.2.2       tls %CFILES
    109  1.3.2.2       tls 
    110  1.3.2.2       tls %SFILES
    111  1.3.2.2       tls 
    112  1.3.2.2       tls %LOAD
    113  1.3.2.2       tls 
    114  1.3.2.2       tls %RULES
    115  1.3.2.2       tls 
    116  1.3.2.2       tls ##
    117  1.3.2.2       tls ## (9) after the config file is inserted
    118  1.3.2.2       tls ##
    119  1.3.2.2       tls 
    120  1.3.2.2       tls ##
    121  1.3.2.2       tls ## (10) port independent kernel machinery
    122  1.3.2.2       tls ##
    123  1.3.2.2       tls 
    124  1.3.2.2       tls .include "$S/conf/Makefile.kern.inc"
    125  1.3.2.2       tls 
    126  1.3.2.2       tls ##
    127  1.3.2.2       tls ## (11) Appending make options.
    128  1.3.2.2       tls ##
    129  1.3.2.2       tls %MAKEOPTIONSAPPEND
    130