1 # $NetBSD: Makefile.sparc,v 1.77 2001/11/20 12:56:39 lukem 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/sparc/conf/``machineid'' 9 # after which you should do 10 # config machineid 11 # Machine generic makefile changes should be made in 12 # /sys/arch/sparc/conf/Makefile.sparc 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 MACHINE_ARCH= sparc 21 USETOOLS?= no 22 NEED_OWN_INSTALL_TARGET?=no 23 .include <bsd.own.mk> 24 25 ## 26 ## (1) port identification 27 ## 28 SPARC= $S/arch/sparc 29 GENASSYM= ${SPARC}/sparc/genassym.cf 30 MD_CPPFLAGS= 31 32 ## 33 ## (2) compile settings 34 ## 35 CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D_KERNEL_OPT \ 36 ${MD_CPPFLAGS} 37 COPTS?= -O2 38 CFLAGS= ${DEBUG} ${COPTS} ${CWARNFLAGS} 39 # work around GCC (egcs-2.91.66) bug which is liable 40 # to use FPU registers as temporaries: 41 CFLAGS+= -mno-fpu 42 AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE 43 44 ## 45 ## (3) libkern and compat 46 ## 47 KERN_AS= obj 48 49 ## 50 ## (4) local objects, compile rules, and dependencies 51 ## 52 MD_OBJS= locore.o 53 MD_CFILES= 54 MD_SFILES= ${SPARC}/sparc/locore.s 55 56 locore.o: ${SPARC}/sparc/locore.s assym.h 57 ${NORMAL_S} 58 59 ## 60 ## (5) link settings 61 ## 62 TEXTADDR?= F0004000 63 EXTRA_LINKFLAGS= -X 64 .if ${OBJECT_FMT} == "ELF" 65 KERN_LDSCRIPT?= kern.ldscript 66 LINKFORMAT= -n -T ${SPARC}/conf/${KERN_LDSCRIPT} 67 .else 68 LINKFORMAT= -N -p 69 .endif 70 71 ## 72 ## (6) port specific target dependencies 73 ## 74 75 # depend on CPU configuration 76 bwtwo.o cgsix.o cgthree.o cgtwo.o cons.o dma.o esp.o fb.o if_ie.o: Makefile 77 ms.c obio.o zs.c autoconf.o clock.o cpu.o disksubr.o: Makefile 78 mem.o openprom.o pmap.o vm_machdep.o: Makefile 79 80 ## 81 ## (7) misc settings 82 ## 83 84 ## 85 ## (8) config(8) generated machinery 86 ## 87 %INCLUDES 88 89 %OBJS 90 91 %CFILES 92 93 %SFILES 94 95 %LOAD 96 97 %RULES 98 99 ## 100 ## (9) port independent kernel machinery 101 ## 102 .include "$S/conf/Makefile.kern.inc" 103