Makefile.sparc64 revision 1.42.2.7       1  1.42.2.7  thorpej # 	$NetBSD: Makefile.sparc64,v 1.42.2.7 2002/12/11 06:12:20 thorpej Exp $
      2  1.42.2.3  nathanw 
      3  1.42.2.3  nathanw #=========================================================================
      4  1.42.2.3  nathanw #
      5  1.42.2.3  nathanw #			***** WARNING ******
      6  1.42.2.3  nathanw #
      7  1.42.2.3  nathanw # ANYONE WHO CHANGES THIS MAKEFILE AND DOES NOT TEST BOTH A 32-BIT
      8  1.42.2.3  nathanw # AND 64-BIT KERNEL WILL BE SHOT.
      9  1.42.2.3  nathanw #
     10  1.42.2.3  nathanw #=========================================================================
     11  1.42.2.3  nathanw 
     12  1.42.2.2  nathanw 
     13  1.42.2.2  nathanw # Makefile for NetBSD
     14  1.42.2.2  nathanw #
     15  1.42.2.2  nathanw # This makefile is constructed from a machine description:
     16  1.42.2.2  nathanw #	config machineid
     17  1.42.2.2  nathanw # Most changes should be made in the machine description
     18  1.42.2.2  nathanw #	/sys/arch/sparc64/conf/``machineid''
     19  1.42.2.2  nathanw # after which you should do
     20  1.42.2.2  nathanw #	config machineid
     21  1.42.2.2  nathanw # Machine generic makefile changes should be made in
     22  1.42.2.2  nathanw #	/sys/arch/sparc64/conf/Makefile.sparc64
     23  1.42.2.2  nathanw # after which config should be rerun for all machines of that type.
     24  1.42.2.2  nathanw #
     25  1.42.2.2  nathanw # To specify debugging, add the config line: makeoptions DEBUG="-g"
     26  1.42.2.2  nathanw # A better way is to specify -g only for a few files.
     27  1.42.2.2  nathanw #
     28  1.42.2.2  nathanw #	makeoptions DEBUGLIST="uvm* trap if_*"
     29  1.42.2.2  nathanw 
     30  1.42.2.3  nathanw # Default to 32-bit.  Set the MACHINE_ARCH accordingly.
     31  1.42.2.3  nathanw #
     32  1.42.2.3  nathanw # You must also be using the correct toolchain or the kernel build
     33  1.42.2.3  nathanw # will fail.
     34  1.42.2.3  nathanw #
     35  1.42.2.2  nathanw LP64?=	no
     36  1.42.2.2  nathanw .if ${LP64} == "yes"
     37  1.42.2.2  nathanw MACHINE_ARCH=sparc64
     38  1.42.2.2  nathanw .else
     39  1.42.2.2  nathanw MACHINE_ARCH=sparc
     40  1.42.2.2  nathanw .endif
     41  1.42.2.2  nathanw 
     42  1.42.2.2  nathanw USETOOLS?=	no
     43  1.42.2.2  nathanw NEED_OWN_INSTALL_TARGET?=no
     44  1.42.2.2  nathanw .include <bsd.own.mk>
     45  1.42.2.2  nathanw 
     46  1.42.2.2  nathanw ##
     47  1.42.2.2  nathanw ## (1) port identification
     48  1.42.2.2  nathanw ##
     49  1.42.2.2  nathanw SPARC64=	$S/arch/sparc64
     50  1.42.2.2  nathanw GENASSYM=	${SPARC64}/sparc64/genassym.cf
     51  1.42.2.2  nathanw 
     52  1.42.2.2  nathanw ##
     53  1.42.2.2  nathanw ## (2) compile settings
     54  1.42.2.2  nathanw ##
     55  1.42.2.3  nathanw CPPFLAGS+=	-Dsparc64 -D__sparc64__
     56  1.42.2.2  nathanw .if ${LP64} == "yes"
     57  1.42.2.3  nathanw # 64-bit kernels
     58  1.42.2.3  nathanw CPPFLAGS+=	-D_LP64 -Wa,-Av9a
     59  1.42.2.3  nathanw AFLAGS+=	-Wa,-Av9a
     60  1.42.2.2  nathanw .if defined(PROF)
     61  1.42.2.3  nathanw # Profiling is only supported in the medium low memory model.
     62  1.42.2.3  nathanw CFLAGS+=	-mcmodel=medlow
     63  1.42.2.3  nathanw .else
     64  1.42.2.3  nathanw # Since the kernel resides in the lower 32 bits, use medium low for now anyway.
     65  1.42.2.2  nathanw CFLAGS+=	-mcmodel=medlow
     66  1.42.2.2  nathanw .endif
     67  1.42.2.3  nathanw .else
     68  1.42.2.3  nathanw # 32-bit kernels
     69  1.42.2.3  nathanw CPPFLAGS+=	-m32 -Wa,-Av8plusa -mcpu=ultrasparc
     70  1.42.2.3  nathanw AFLAGS+=	-Wa,-Av8plusa
     71  1.42.2.3  nathanw .endif
     72  1.42.2.3  nathanw CFLAGS+=	-mno-fpu
     73  1.42.2.3  nathanw AFLAGS+=	-x assembler-with-cpp -traditional-cpp
     74  1.42.2.2  nathanw 
     75  1.42.2.2  nathanw NOOPT_C=	${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -O0 -c $<
     76  1.42.2.2  nathanw 
     77  1.42.2.2  nathanw ##
     78  1.42.2.2  nathanw ## (3) libkern and compat
     79  1.42.2.2  nathanw ##
     80  1.42.2.2  nathanw # KERN_AS=	obj	# bcopy, bzero, memcpy, memset, etc. are in locore.s
     81  1.42.2.2  nathanw 
     82  1.42.2.2  nathanw ##
     83  1.42.2.2  nathanw ## (4) local objects, compile rules, and dependencies
     84  1.42.2.2  nathanw ##
     85  1.42.2.2  nathanw MD_OBJS=	locore.o
     86  1.42.2.2  nathanw MD_CFILES=
     87  1.42.2.2  nathanw MD_SFILES=	${SPARC64}/sparc64/locore.s
     88  1.42.2.2  nathanw 
     89  1.42.2.2  nathanw locore.o: ${SPARC64}/sparc64/locore.s assym.h
     90  1.42.2.2  nathanw 	${NORMAL_S}
     91  1.42.2.2  nathanw 
     92  1.42.2.2  nathanw ##
     93  1.42.2.2  nathanw ## (5) link settings
     94  1.42.2.2  nathanw ##
     95  1.42.2.2  nathanw TEXTADDR?=	01000000
     96  1.42.2.2  nathanw DATAADDR?=	01800000
     97  1.42.2.2  nathanw LINKFORMAT=	-n -T ${SPARC64}/conf/${KERN_LDSCRIPT}
     98  1.42.2.2  nathanw .if ${LP64} == "yes"
     99  1.42.2.2  nathanw KERN_LDSCRIPT?= kern.ldscript
    100  1.42.2.2  nathanw .else
    101  1.42.2.2  nathanw KERN_LDSCRIPT?= kern32.ldscript
    102  1.42.2.2  nathanw .endif
    103  1.42.2.2  nathanw 
    104  1.42.2.2  nathanw ##
    105  1.42.2.2  nathanw ## (6) port specific target dependencies
    106  1.42.2.2  nathanw ##
    107  1.42.2.2  nathanw 
    108  1.42.2.2  nathanw # depend on CPU configuration
    109  1.42.2.2  nathanw bwtwo.o cgsix.o cgthree.o cgtwo.o cons.o dma.o esp.o fb.o if_ie.o: Makefile
    110  1.42.2.2  nathanw ms.c obio.o zs.c autoconf.o clock.o cpu.o disksubr.o locore.o: Makefile
    111  1.42.2.2  nathanw machdep.o mem.o openprom.o pmap.o vm_machdep.o: Makefile
    112  1.42.2.2  nathanw 
    113  1.42.2.2  nathanw ##
    114  1.42.2.2  nathanw ## (7) misc settings
    115  1.42.2.2  nathanw ##
    116  1.42.2.2  nathanw 
    117  1.42.2.6  nathanw # define .MAIN _before_ the make() check, so that implicit target
    118  1.42.2.6  nathanw # would be defined
    119  1.42.2.6  nathanw .MAIN: all
    120  1.42.2.6  nathanw 
    121  1.42.2.5  nathanw .if make(depend) || make(all) || make(dependall)
    122  1.42.2.5  nathanw .BEGIN:
    123  1.42.2.5  nathanw 	@rm -f sparc && \
    124  1.42.2.5  nathanw 		ln -s $S/arch/sparc/include sparc
    125  1.42.2.5  nathanw .endif
    126  1.42.2.5  nathanw 
    127  1.42.2.2  nathanw ##
    128  1.42.2.2  nathanw ## (8) config(8) generated machinery
    129  1.42.2.2  nathanw ##
    130  1.42.2.2  nathanw %INCLUDES
    131  1.42.2.2  nathanw 
    132  1.42.2.2  nathanw %OBJS
    133  1.42.2.2  nathanw 
    134  1.42.2.2  nathanw %CFILES
    135  1.42.2.2  nathanw 
    136  1.42.2.2  nathanw %SFILES
    137  1.42.2.2  nathanw 
    138  1.42.2.2  nathanw %LOAD
    139  1.42.2.2  nathanw 
    140  1.42.2.2  nathanw %RULES
    141  1.42.2.2  nathanw 
    142  1.42.2.2  nathanw ##
    143  1.42.2.2  nathanw ## (9) port independent kernel machinery
    144  1.42.2.2  nathanw ##
    145  1.42.2.2  nathanw .include "$S/conf/Makefile.kern.inc"
    146