Home | History | Annotate | Line # | Download | only in conf
Makefile.mips revision 1.36
      1 #	$NetBSD: Makefile.mips,v 1.36 2004/09/29 06:03:03 sekiya 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/<machine>/conf/``machineid''
      9 # after which you should do
     10 #	config machineid
     11 # Machine generic makefile changes should be made in
     12 #	/sys/arch/mips/conf/Makefile.mips
     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 # Add arguments for the toolchain (necessary for elf64)
     26 #
     27 
     28 LD+=${LDOPTS}
     29 .if defined(RANLIB_OVERRIDE)
     30 RANLIB=true
     31 .endif
     32 
     33 ##
     34 ## (0) toolchain settings for things that aren't part of the standard
     35 ## toolchain
     36 ##
     37 ELF2ECOFF?=	elf2ecoff
     38 
     39 ##
     40 ## (1) port identification
     41 ##
     42 .ifndef S
     43 S=		../../../..
     44 .endif
     45 THISMIPS=	$S/arch/${MACHINE}
     46 MIPS=		$S/arch/mips
     47 GENASSYM=	${MIPS}/mips/genassym.cf
     48 .-include "${THISMIPS}/conf/Makefile.${MACHINE}.inc"
     49 
     50 ##
     51 ## (2) compile settings
     52 ##
     53 CPPFLAGS+=	-D${MACHINE}
     54 DEFGP?=		-G 0
     55 GP?=		${DEFGP}
     56 CFLAGS+=	${GP} -mno-abicalls -msoft-float
     57 AFLAGS+=	-mno-abicalls -x assembler-with-cpp -traditional-cpp ${AOPTS}
     58 
     59 ##
     60 ## (3) libkern and compat
     61 ##
     62 
     63 ##
     64 ## (4) local objects, compile rules, and dependencies
     65 ##
     66 MD_OBJS=	locore.o locore_machdep.o
     67 MD_CFILES=
     68 MD_SFILES=	${MIPS}/mips/locore.S ${THISMIPS}/${MACHINE}/locore_machdep.S	
     69 
     70 locore.o: ${MIPS}/mips/locore.S assym.h
     71 	${NORMAL_S}
     72 
     73 locore_machdep.o: ${THISMIPS}/${MACHINE}/locore_machdep.S assym.h
     74 	${NORMAL_S}
     75 
     76 ##
     77 ## (5) link settings
     78 ##
     79 TEXTADDR?=		${DEFTEXTADDR}
     80 KERNLDSCRIPT?=		${MIPS}/conf/kern.ldscript
     81 # some mips ports specify a "magic" format
     82 LINKFORMAT+=		-T ${KERNLDSCRIPT}
     83 EXTRA_LINKFLAGS=	${GP} ${LDOPTS}
     84 LINKFLAGS_NORMAL=	-x
     85 STRIPFLAGS=		-g -X -x
     86 
     87 ##
     88 ## (6) port specific target dependencies
     89 ##
     90 
     91 # depend on CPU configuration
     92 machdep.o mainbus.o trap.o: Makefile
     93 
     94 # depend on System V IPC/shmem options
     95 mips_machdep.o pmap.o: Makefile
     96 
     97 # various assembly files that depend on assym.h
     98 copy.o fp.o locore.o locore_mips1.o locore_mips3.o sigcode.o: assym.h
     99 mips32_subr.o mips3_subr.o mips5900_subr.o mips64_subr.o mipsX_subr.o: assym.h
    100 
    101 
    102 ##
    103 ## (7) misc settings
    104 ##
    105 
    106 ##
    107 ## (8) config(8) generated machinery
    108 ##
    109 %INCLUDES
    110 
    111 %OBJS
    112 
    113 %CFILES
    114 
    115 %SFILES
    116 
    117 %LOAD
    118 
    119 %RULES
    120 
    121 ##
    122 ## (9) port independent kernel machinery
    123 ##
    124 .include "$S/conf/Makefile.kern.inc"
    125 
    126 ##
    127 ## (10) Appending make options.
    128 ##
    129 %MAKEOPTIONSAPPEND
    130