Home | History | Annotate | Line # | Download | only in conf
Makefile.sparc64 revision 1.82
      1  1.82    martin # 	$NetBSD: Makefile.sparc64,v 1.82 2016/03/19 18:50:25 martin Exp $
      2  1.45       eeh 
      3  1.45       eeh #=========================================================================
      4  1.45       eeh #
      5  1.45       eeh #			***** WARNING ******
      6  1.45       eeh #
      7  1.45       eeh # ANYONE WHO CHANGES THIS MAKEFILE AND DOES NOT TEST BOTH A 32-BIT
      8  1.45       eeh # AND 64-BIT KERNEL WILL BE SHOT.
      9  1.45       eeh #
     10  1.45       eeh #=========================================================================
     11  1.45       eeh 
     12   1.1       eeh 
     13   1.1       eeh # Makefile for NetBSD
     14   1.1       eeh #
     15   1.1       eeh # This makefile is constructed from a machine description:
     16   1.1       eeh #	config machineid
     17   1.1       eeh # Most changes should be made in the machine description
     18   1.1       eeh #	/sys/arch/sparc64/conf/``machineid''
     19   1.1       eeh # after which you should do
     20   1.1       eeh #	config machineid
     21   1.1       eeh # Machine generic makefile changes should be made in
     22   1.1       eeh #	/sys/arch/sparc64/conf/Makefile.sparc64
     23   1.1       eeh # after which config should be rerun for all machines of that type.
     24  1.44    atatat #
     25  1.44    atatat # To specify debugging, add the config line: makeoptions DEBUG="-g"
     26  1.44    atatat # A better way is to specify -g only for a few files.
     27  1.44    atatat #
     28  1.44    atatat #	makeoptions DEBUGLIST="uvm* trap if_*"
     29   1.1       eeh 
     30  1.45       eeh # Default to 32-bit.  Set the MACHINE_ARCH accordingly.
     31  1.45       eeh #
     32  1.45       eeh # You must also be using the correct toolchain or the kernel build
     33  1.45       eeh # will fail.
     34  1.45       eeh #
     35  1.41   thorpej LP64?=	no
     36  1.41   thorpej .if ${LP64} == "yes"
     37  1.40   thorpej MACHINE_ARCH=sparc64
     38  1.41   thorpej .else
     39  1.41   thorpej MACHINE_ARCH=sparc
     40  1.41   thorpej .endif
     41  1.42       jmc 
     42  1.42       jmc USETOOLS?=	no
     43  1.44    atatat NEED_OWN_INSTALL_TARGET?=no
     44  1.39   thorpej .include <bsd.own.mk>
     45  1.39   thorpej 
     46  1.82    martin USE_SSP?=	yes
     47  1.82    martin 
     48  1.44    atatat ##
     49  1.44    atatat ## (1) port identification
     50  1.44    atatat ##
     51   1.1       eeh SPARC64=	$S/arch/sparc64
     52  1.56  christos GENASSYM_CONF=	${SPARC64}/sparc64/genassym.cf
     53   1.1       eeh 
     54  1.44    atatat ##
     55  1.44    atatat ## (2) compile settings
     56  1.44    atatat ##
     57  1.45       eeh CPPFLAGS+=	-Dsparc64 -D__sparc64__
     58  1.40   thorpej .if ${LP64} == "yes"
     59  1.45       eeh # 64-bit kernels
     60  1.45       eeh CPPFLAGS+=	-D_LP64 -Wa,-Av9a
     61  1.81     joerg CPPFLAGS+=	${${ACTIVE_CC} == "clang":? -Qunused-arguments :}
     62  1.45       eeh AFLAGS+=	-Wa,-Av9a
     63  1.30       eeh .if defined(PROF)
     64  1.45       eeh # Profiling is only supported in the medium low memory model.
     65  1.74     joerg CFLAGS+=	${${ACTIVE_CC} == "gcc":? -mcmodel=medlow :}
     66  1.74     joerg CFLAGS+=	${${ACTIVE_CC} == "clang":? -mcmodel=small :}
     67  1.45       eeh .else
     68  1.45       eeh # Since the kernel resides in the lower 32 bits, use medium low for now anyway.
     69  1.74     joerg CFLAGS+=	${${ACTIVE_CC} == "gcc":? -mcmodel=medlow :}
     70  1.74     joerg CFLAGS+=	${${ACTIVE_CC} == "clang":? -mcmodel=small :}
     71  1.30       eeh .endif
     72  1.45       eeh .else
     73  1.45       eeh # 32-bit kernels
     74  1.45       eeh CPPFLAGS+=	-m32 -Wa,-Av8plusa -mcpu=ultrasparc
     75  1.81     joerg CPPFLAGS+=	${${ACTIVE_CC} == "clang":? -Qunused-arguments :}
     76  1.45       eeh AFLAGS+=	-Wa,-Av8plusa
     77  1.81     joerg AFLAGS+=	${${ACTIVE_CC} == "clang":? -Qunused-arguments :}
     78  1.45       eeh .endif
     79  1.81     joerg CFLAGS+=	${${ACTIVE_CC} == "gcc":? -mno-fpu :}
     80  1.80    martin AFLAGS+=	-x assembler-with-cpp
     81  1.44    atatat 
     82  1.44    atatat ##
     83  1.44    atatat ## (3) libkern and compat
     84  1.44    atatat ##
     85  1.72  christos OPT_MODULAR=	%MODULAR%
     86  1.72  christos .if !empty(OPT_MODULAR)
     87  1.72  christos KERN_AS=	obj
     88  1.72  christos .else
     89  1.72  christos KERN_AS=	library
     90  1.72  christos .endif
     91  1.44    atatat 
     92  1.44    atatat ##
     93  1.44    atatat ## (4) local objects, compile rules, and dependencies
     94  1.44    atatat ##
     95  1.69    martin MD_OBJS=	locore.o copy.o mp_subr.o
     96  1.44    atatat MD_CFILES=
     97  1.69    martin MD_SFILES=	${SPARC64}/sparc64/locore.s ${SPARC64}/sparc64/copy.S \
     98  1.69    martin 	 ${SPARC64}/sparc64/mp_subr.S
     99  1.31       eeh 
    100  1.44    atatat locore.o: ${SPARC64}/sparc64/locore.s assym.h
    101  1.44    atatat 	${NORMAL_S}
    102  1.51  christos 
    103  1.69    martin copy.o:	${SPARC64}/sparc64/copy.S assym.h
    104  1.69    martin 	${NORMAL_S}
    105  1.69    martin 
    106  1.69    martin mp_subr.o:	${SPARC64}/sparc64/mp_subr.S assym.h
    107  1.69    martin 	${NORMAL_S}
    108  1.69    martin 
    109  1.73  christos # Our libkern needs stuff from assym.h for memcpy and memset.
    110  1.73  christos dependkernlib:	assym.h
    111  1.73  christos 
    112  1.44    atatat ##
    113  1.44    atatat ## (5) link settings
    114  1.44    atatat ##
    115  1.44    atatat TEXTADDR?=	01000000
    116  1.40   thorpej .if ${LP64} == "yes"
    117  1.77  uebayasi KERNLDSCRIPT?= ${SPARC64}/conf/kern.ldscript
    118  1.35       mrg .else
    119  1.77  uebayasi KERNLDSCRIPT?= ${SPARC64}/conf/kern32.ldscript
    120  1.35       mrg .endif
    121  1.31       eeh 
    122  1.44    atatat ##
    123  1.44    atatat ## (6) port specific target dependencies
    124  1.44    atatat ##
    125  1.10       mrg 
    126  1.44    atatat # depend on CPU configuration
    127  1.44    atatat bwtwo.o cgsix.o cgthree.o cgtwo.o cons.o dma.o esp.o fb.o if_ie.o: Makefile
    128  1.44    atatat ms.c obio.o zs.c autoconf.o clock.o cpu.o disksubr.o locore.o: Makefile
    129  1.44    atatat machdep.o mem.o openprom.o pmap.o vm_machdep.o: Makefile
    130  1.44    atatat 
    131  1.66     joerg cpu_in_cksum.o lock_stubs.o: assym.h
    132  1.66     joerg 
    133  1.44    atatat ##
    134  1.44    atatat ## (7) misc settings
    135  1.44    atatat ##
    136  1.48  jdolecek 
    137  1.48  jdolecek # define .MAIN _before_ the make() check, so that implicit target
    138  1.48  jdolecek # would be defined
    139  1.48  jdolecek .MAIN: all
    140  1.47       mrg 
    141  1.47       mrg .if make(depend) || make(all) || make(dependall)
    142  1.47       mrg .BEGIN:
    143  1.47       mrg 	@rm -f sparc && \
    144  1.47       mrg 		ln -s $S/arch/sparc/include sparc
    145  1.47       mrg .endif
    146  1.44    atatat 
    147  1.44    atatat ##
    148  1.44    atatat ## (8) config(8) generated machinery
    149  1.44    atatat ##
    150  1.10       mrg %INCLUDES
    151   1.1       eeh 
    152   1.1       eeh %OBJS
    153   1.1       eeh 
    154   1.1       eeh %CFILES
    155   1.1       eeh 
    156   1.1       eeh %SFILES
    157   1.1       eeh 
    158   1.1       eeh %LOAD
    159   1.2       mrg 
    160  1.44    atatat %RULES
    161   1.1       eeh 
    162  1.44    atatat ##
    163  1.44    atatat ## (9) port independent kernel machinery
    164  1.44    atatat ##
    165  1.44    atatat .include "$S/conf/Makefile.kern.inc"
    166  1.55   thorpej 
    167  1.55   thorpej ##
    168  1.55   thorpej ## (10) Appending make options.
    169  1.55   thorpej ##
    170  1.55   thorpej %MAKEOPTIONSAPPEND
    171