1 1.94 joerg # $NetBSD: Makefile.sparc,v 1.94 2016/02/27 19:26:13 joerg Exp $ 2 1.15 deraadt 3 1.25 mycroft # Makefile for NetBSD 4 1.1 deraadt # 5 1.1 deraadt # This makefile is constructed from a machine description: 6 1.1 deraadt # config machineid 7 1.1 deraadt # Most changes should be made in the machine description 8 1.25 mycroft # /sys/arch/sparc/conf/``machineid'' 9 1.1 deraadt # after which you should do 10 1.25 mycroft # config machineid 11 1.1 deraadt # Machine generic makefile changes should be made in 12 1.25 mycroft # /sys/arch/sparc/conf/Makefile.sparc 13 1.1 deraadt # after which config should be rerun for all machines of that type. 14 1.76 atatat # 15 1.77 lukem # To specify debugging, add the config line: makeoptions DEBUG="-g" 16 1.76 atatat # A better way is to specify -g only for a few files. 17 1.76 atatat # 18 1.76 atatat # makeoptions DEBUGLIST="uvm* trap if_*" 19 1.74 thorpej 20 1.76 atatat MACHINE_ARCH= sparc 21 1.75 jmc USETOOLS?= no 22 1.76 atatat NEED_OWN_INSTALL_TARGET?=no 23 1.56 christos .include <bsd.own.mk> 24 1.56 christos 25 1.76 atatat ## 26 1.76 atatat ## (1) port identification 27 1.76 atatat ## 28 1.76 atatat SPARC= $S/arch/sparc 29 1.84 christos GENASSYM_CONF= ${SPARC}/sparc/genassym.cf 30 1.76 atatat 31 1.76 atatat ## 32 1.76 atatat ## (2) compile settings 33 1.76 atatat ## 34 1.71 pk # work around GCC (egcs-2.91.66) bug which is liable 35 1.71 pk # to use FPU registers as temporaries: 36 1.94 joerg CFLAGS+= ${${ACTIVE_CC} == "gcc":? -mno-fpu :} 37 1.89 mrg CFLAGS+= -Wa,-Av8 38 1.94 joerg CFLAGS+= ${${ACTIVE_CC} == "clang":? -Qunused-arguments :} 39 1.88 joerg AFLAGS+= -x assembler-with-cpp 40 1.89 mrg AFLAGS+= -Wa,-Av8 41 1.94 joerg AFLAGS+= ${${ACTIVE_CC} == "clang":? -Qunused-arguments :} 42 1.61 mrg 43 1.76 atatat ## 44 1.77 lukem ## (3) libkern and compat 45 1.76 atatat ## 46 1.76 atatat KERN_AS= obj 47 1.76 atatat 48 1.76 atatat ## 49 1.76 atatat ## (4) local objects, compile rules, and dependencies 50 1.76 atatat ## 51 1.76 atatat MD_OBJS= locore.o 52 1.76 atatat MD_CFILES= 53 1.76 atatat MD_SFILES= ${SPARC}/sparc/locore.s 54 1.37 mycroft 55 1.76 atatat locore.o: ${SPARC}/sparc/locore.s assym.h 56 1.76 atatat ${NORMAL_S} 57 1.81 christos 58 1.86 joerg amd7930intr.o bsd_fdintr.o lock_stubs.o: assym.h 59 1.5 deraadt 60 1.76 atatat ## 61 1.76 atatat ## (5) link settings 62 1.76 atatat ## 63 1.76 atatat TEXTADDR?= F0004000 64 1.76 atatat EXTRA_LINKFLAGS= -X 65 1.92 uebayasi KERNLDSCRIPT?= ${SPARC}/conf/kern.ldscript 66 1.90 uebayasi LINKFORMAT= -n 67 1.21 christos 68 1.76 atatat ## 69 1.76 atatat ## (6) port specific target dependencies 70 1.76 atatat ## 71 1.76 atatat 72 1.76 atatat ## 73 1.76 atatat ## (7) misc settings 74 1.76 atatat ## 75 1.76 atatat 76 1.76 atatat ## 77 1.76 atatat ## (8) config(8) generated machinery 78 1.76 atatat ## 79 1.76 atatat %INCLUDES 80 1.1 deraadt 81 1.1 deraadt %OBJS 82 1.1 deraadt 83 1.1 deraadt %CFILES 84 1.1 deraadt 85 1.25 mycroft %SFILES 86 1.25 mycroft 87 1.1 deraadt %LOAD 88 1.1 deraadt 89 1.76 atatat %RULES 90 1.1 deraadt 91 1.76 atatat ## 92 1.76 atatat ## (9) port independent kernel machinery 93 1.76 atatat ## 94 1.76 atatat .include "$S/conf/Makefile.kern.inc" 95 1.83 thorpej 96 1.83 thorpej ## 97 1.83 thorpej ## (10) Appending make options. 98 1.83 thorpej ## 99 1.83 thorpej %MAKEOPTIONSAPPEND 100