Makefile.i386 revision 1.190
1# $NetBSD: Makefile.i386,v 1.190 2018/04/07 19:38:06 mrg 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/i386/conf/``machineid'' 9# after which you should do 10# config machineid 11# Machine generic makefile changes should be made in 12# /sys/arch/i386/conf/Makefile.i386 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= i386 21USETOOLS?= no 22NEED_OWN_INSTALL_TARGET?=no 23.include <bsd.own.mk> 24 25USE_SSP?= yes 26 27## 28## (1) port identification 29## 30I386= $S/arch/i386 31GENASSYM_CONF= ${I386}/i386/genassym.cf 32 33## 34## (2) compile settings 35## 36DEFCOPTS= -O2 -fno-omit-frame-pointer 37CPPFLAGS+= -Di386 38CFLAGS+= -msoft-float 39## no-sse implies no-sse2 but not no-avx 40CFLAGS+= -mno-mmx -mno-sse -mno-avx 41 42.if !empty(SPECTRE_V2_GCC_MITIGATION) && ${HAVE_GCC:U0} > 0 43CFLAGS+= -mindirect-branch=thunk 44CFLAGS+= -mindirect-branch-register 45.endif 46 47## 48## (3) libkern and compat 49## 50OPT_MODULAR= %MODULAR% 51.if !empty(OPT_MODULAR) 52KERN_AS= obj 53.else 54KERN_AS= library 55.endif 56 57## 58## (4) local objects, compile rules, and dependencies 59## 60MD_OBJS= locore.o copy.o spl.o vector.o lock_stubs.o 61MD_CFILES= 62MD_SFILES= ${I386}/i386/locore.S ${I386}/i386/copy.S ${I386}/i386/spl.S \ 63 ${I386}/i386/vector.S ${I386}/i386/lock_stubs.S 64 65locore.o: ${I386}/i386/locore.S assym.h 66 ${NORMAL_S} 67 68copy.o: ${I386}/i386/copy.S assym.h 69 ${NORMAL_S} 70 71spl.o: ${I386}/i386/spl.S assym.h 72 ${NORMAL_S} 73 74vector.o: ${I386}/i386/vector.S assym.h 75 ${NORMAL_S} 76 77lock_stubs.o: ${I386}/i386/lock_stubs.S assym.h 78 ${NORMAL_S} 79 80## 81## (5) link settings 82## 83TEXTADDR?= c0100000 84LINKFLAGS_NORMAL= -X 85KERNLDSCRIPT?= ${I386}/conf/kern.ldscript 86 87## 88## (6) port specific target dependencies 89## 90 91i386func.o: assym.h 92linux_sigcode.o lock_stubs.o: assym.h 93cpufunc.o cpu_in_cksum.o pnpbioscall.o bioscall.o: assym.h 94mptramp.o: assym.h 95acpi_wakeup_low.o busfunc.o: assym.h 96 97## 98## (7) misc settings 99## 100 101.if !make(obj) && !make(clean) && !make(cleandir) 102.BEGIN:: 103 -@rm -f i386 && \ 104 ln -s $S/arch/i386/include i386 105.endif 106 107## 108## (8) config(8) generated machinery 109## 110%INCLUDES 111 112%OBJS 113 114%CFILES 115 116%SFILES 117 118%LOAD 119 120%RULES 121 122## 123## (9) port independent kernel machinery 124## 125.include "$S/conf/Makefile.kern.inc" 126 127## Include rules for ACPI wakecode 128.include "$S/arch/x86/acpi/Makefile.wakecode.inc" 129 130## 131## (10) Appending make options. 132## 133%MAKEOPTIONSAPPEND 134