1 # $NetBSD: Makefile.mips,v 1.33 2003/07/04 03:48:01 simonb 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 ## (1) port identification 26 ## 27 .ifndef S 28 S= ../../../.. 29 .endif 30 THISMIPS= $S/arch/${MACHINE} 31 MIPS= $S/arch/mips 32 GENASSYM= ${MIPS}/mips/genassym.cf 33 .-include "${THISMIPS}/conf/Makefile.${MACHINE}.inc" 34 35 ## 36 ## (2) compile settings 37 ## 38 CPPFLAGS+= -D${MACHINE} 39 DEFGP?= -G 0 40 GP?= ${DEFGP} 41 CFLAGS+= ${GP} -mno-abicalls -msoft-float 42 AFLAGS+= -mno-abicalls -x assembler-with-cpp -traditional-cpp 43 44 ## 45 ## (3) libkern and compat 46 ## 47 48 ## 49 ## (4) local objects, compile rules, and dependencies 50 ## 51 MD_OBJS= locore.o locore_machdep.o 52 MD_CFILES= 53 MD_SFILES= ${MIPS}/mips/locore.S ${THISMIPS}/${MACHINE}/locore_machdep.S 54 55 locore.o: ${MIPS}/mips/locore.S assym.h 56 ${NORMAL_S} 57 58 locore_machdep.o: ${THISMIPS}/${MACHINE}/locore_machdep.S assym.h 59 ${NORMAL_S} 60 61 ## 62 ## (5) link settings 63 ## 64 TEXTADDR?= ${DEFTEXTADDR} 65 KERNLDSCRIPT?= ${MIPS}/conf/kern.ldscript 66 # some mips ports specify a "magic" format 67 LINKFORMAT+= -T ${KERNLDSCRIPT} 68 EXTRA_LINKFLAGS= ${GP} 69 LINKFLAGS_NORMAL= -x 70 STRIPFLAGS= -g -X -x 71 72 ## 73 ## (6) port specific target dependencies 74 ## 75 76 # depend on CPU configuration 77 machdep.o mainbus.o trap.o: Makefile 78 79 # depend on System V IPC/shmem options 80 mips_machdep.o pmap.o: Makefile 81 82 # various assembly files that depend on assym.h 83 copy.o fp.o locore.o locore_mips1.o locore_mips3.o sigcode.o: assym.h 84 mips32_subr.o mips3_subr.o mips5900_subr.o mips64_subr.o mipsX_subr.o: assym.h 85 86 87 ## 88 ## (7) misc settings 89 ## 90 91 ## 92 ## (8) config(8) generated machinery 93 ## 94 %INCLUDES 95 96 %OBJS 97 98 %CFILES 99 100 %SFILES 101 102 %LOAD 103 104 %RULES 105 106 ## 107 ## (9) port independent kernel machinery 108 ## 109 .include "$S/conf/Makefile.kern.inc" 110