1 # $NetBSD: Makefile.sparc,v 1.96 2018/09/22 12:24:03 rin 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_CONF= ${SPARC}/sparc/genassym.cf 30 31 ## 32 ## (2) compile settings 33 ## 34 # work around GCC (egcs-2.91.66) bug which is liable 35 # to use FPU registers as temporaries: 36 CFLAGS+= ${${ACTIVE_CC} == "gcc":? -mno-fpu :} 37 CFLAGS+= -Wa,-Av8 38 CFLAGS+= ${${ACTIVE_CC} == "clang":? -Qunused-arguments :} 39 AFLAGS+= -x assembler-with-cpp 40 AFLAGS+= -Wa,-Av8 41 AFLAGS+= ${${ACTIVE_CC} == "clang":? -Qunused-arguments :} 42 COPTS.kern_timeout.c += -Wno-stack-protector 43 44 ## 45 ## (3) libkern and compat 46 ## 47 OPT_MODULAR= %MODULAR% 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 amd7930intr.o bsd_fdintr.o lock_stubs.o: assym.h 60 61 ## 62 ## (5) link settings 63 ## 64 TEXTADDR?= F0004000 65 EXTRA_LINKFLAGS= -X 66 KERNLDSCRIPT?= ${SPARC}/conf/kern.ldscript 67 LINKFORMAT= -n 68 69 ## 70 ## (6) port specific target dependencies 71 ## 72 73 ## 74 ## (7) misc settings 75 ## 76 77 ## 78 ## (8) config(8) generated machinery 79 ## 80 %INCLUDES 81 82 %OBJS 83 84 %CFILES 85 86 %SFILES 87 88 %LOAD 89 90 %RULES 91 92 ## 93 ## (9) port independent kernel machinery 94 ## 95 .include "$S/conf/Makefile.kern.inc" 96 97 ## 98 ## (10) Appending make options. 99 ## 100 %MAKEOPTIONSAPPEND 101