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