1# $NetBSD: Makefile.sun2,v 1.29 2021/08/30 19:01:05 christos 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/sun2/conf/``machineid'' 9# after which you should do 10# config machineid 11# Machine generic makefile changes should be made in 12# /sys/arch/sun2/conf/Makefile.sun2 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 20MACHINE_ARCH=m68000 21USETOOLS?= no 22NEED_OWN_INSTALL_TARGET?=no 23.include <bsd.own.mk> 24 25## 26## (1) port identification 27## 28SUN2= $S/arch/sun2 29GENASSYM_CONF= ${SUN2}/sun2/genassym.cf 30 31## 32## (2) compile settings 33## 34CPPFLAGS+= -Dsun2 35CFLAGS+= -msoft-float -fno-defer-pop 36AFLAGS+= -x assembler-with-cpp 37 38# XXX 39COPTS.promlib.c+=${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 9:? -Wno-error=array-bounds :} 40 41## 42## (3) libkern and compat 43## 44OPT_MODULAR= %MODULAR% 45# XXX lib/libkern/arch/m68k/Makefile.inc needs to know that 46# XXX our MACHINE_ARCH is m68000, and not m68k. --fredette 47KERNMISCMAKEFLAGS= MACHINE_ARCH=${MACHINE_ARCH} 48 49## 50## (4) local objects, compile rules, and dependencies 51## 52MD_OBJS= locore.o 53MD_CFILES= 54MD_SFILES= ${SUN2}/sun2/locore.s 55 56locore.o: ${SUN2}/sun2/locore.s 57 ${NORMAL_S} 58 59## 60## (5) link settings 61## 62LINKFORMAT= -N 63TEXTADDR?= 00006000 64 65## 66## (6) port specific target dependencies 67## 68 69# For cross-compilation, the "gcc -M" mkdep script is convenient, 70# but that does not correctly make rules from *.s files. The 71# easiest work-around is to just list those dependencies here. 72locore.o: assym.h m68k/asm.h m68k/trap.h 73copy.o: assym.h m68k/asm.h $S/sys/errno.h 74bcopy.o: assym.h m68k/asm.h 75copypage.o: assym.h m68k/asm.h 76lock_stubs.o: assym.h 77 78# depend on CPU configuration 79db_machdep.o dvma.o machdep.o pmap.o sun2_startup.o vm_machdep.o: Makefile 80 81# depends on DDB, etc. 82stub.o: Makefile 83 84## 85## (7) misc settings 86## 87 88## 89## (8) config(8) generated machinery 90## 91%INCLUDES 92 93%OBJS 94 95%CFILES 96 97%SFILES 98 99%LOAD 100 101%RULES 102 103## 104## (9) port independent kernel machinery 105## 106.include "$S/conf/Makefile.kern.inc" 107 108## 109## (10) Appending make options. 110## 111%MAKEOPTIONSAPPEND 112