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