Makefile.i386 revision 1.190
11.190Smrg# $NetBSD: Makefile.i386,v 1.190 2018/04/07 19:38:06 mrg Exp $ 21.62Smycroft 31.8Scgd# Makefile for NetBSD 41.1Scgd# 51.1Scgd# This makefile is constructed from a machine description: 61.1Scgd# config machineid 71.1Scgd# Most changes should be made in the machine description 81.36Sderaadt# /sys/arch/i386/conf/``machineid'' 91.1Scgd# after which you should do 101.62Smycroft# config machineid 111.62Smycroft# Machine generic makefile changes should be made in 121.36Sderaadt# /sys/arch/i386/conf/Makefile.i386 131.42Smycroft# after which config should be rerun for all machines of that type. 141.119Satatat# 151.120Slukem# To specify debugging, add the config line: makeoptions DEBUG="-g" 161.119Satatat# A better way is to specify -g only for a few files. 171.119Satatat# 181.119Satatat# makeoptions DEBUGLIST="uvm* trap if_*" 191.117Sthorpej 201.119SatatatMACHINE_ARCH= i386 211.118SjmcUSETOOLS?= no 221.119SatatatNEED_OWN_INSTALL_TARGET?=no 231.119Satatat.include <bsd.own.mk> 241.42Smycroft 251.166StronUSE_SSP?= yes 261.166Stron 271.119Satatat## 281.119Satatat## (1) port identification 291.119Satatat## 301.119SatatatI386= $S/arch/i386 311.138SchristosGENASSYM_CONF= ${I386}/i386/genassym.cf 321.119Satatat 331.119Satatat## 341.119Satatat## (2) compile settings 351.119Satatat## 361.182SjakllschDEFCOPTS= -O2 -fno-omit-frame-pointer 371.121SatatatCPPFLAGS+= -Di386 381.189SmaxvCFLAGS+= -msoft-float 391.180Sdsl## no-sse implies no-sse2 but not no-avx 401.180SdslCFLAGS+= -mno-mmx -mno-sse -mno-avx 411.170Sjoerg 421.190Smrg.if !empty(SPECTRE_V2_GCC_MITIGATION) && ${HAVE_GCC:U0} > 0 431.190SmrgCFLAGS+= -mindirect-branch=thunk 441.190SmrgCFLAGS+= -mindirect-branch-register 451.190Smrg.endif 461.190Smrg 471.119Satatat## 481.120Slukem## (3) libkern and compat 491.119Satatat## 501.164ScubeOPT_MODULAR= %MODULAR% 511.163Sapb.if !empty(OPT_MODULAR) 521.119SatatatKERN_AS= obj 531.137Sdsl.else 541.137SdslKERN_AS= library 551.137Sdsl.endif 561.62Smycroft 571.119Satatat## 581.119Satatat## (4) local objects, compile rules, and dependencies 591.119Satatat## 601.150SchristosMD_OBJS= locore.o copy.o spl.o vector.o lock_stubs.o 611.119SatatatMD_CFILES= 621.141SyamtMD_SFILES= ${I386}/i386/locore.S ${I386}/i386/copy.S ${I386}/i386/spl.S \ 631.150Schristos ${I386}/i386/vector.S ${I386}/i386/lock_stubs.S 641.1Scgd 651.125Sfvdllocore.o: ${I386}/i386/locore.S assym.h 661.125Sfvdl ${NORMAL_S} 671.125Sfvdl 681.141Syamtcopy.o: ${I386}/i386/copy.S assym.h 691.141Syamt ${NORMAL_S} 701.141Syamt 711.125Sfvdlspl.o: ${I386}/i386/spl.S assym.h 721.125Sfvdl ${NORMAL_S} 731.125Sfvdl 741.125Sfvdlvector.o: ${I386}/i386/vector.S assym.h 751.129Schristos ${NORMAL_S} 761.129Schristos 771.150Schristoslock_stubs.o: ${I386}/i386/lock_stubs.S assym.h 781.150Schristos ${NORMAL_S} 791.150Schristos 801.119Satatat## 811.119Satatat## (5) link settings 821.119Satatat## 831.116SthorpejTEXTADDR?= c0100000 841.122SatatatLINKFLAGS_NORMAL= -X 851.184SuebayasiKERNLDSCRIPT?= ${I386}/conf/kern.ldscript 861.107Sthorpej 871.119Satatat## 881.119Satatat## (6) port specific target dependencies 891.119Satatat## 901.98Smrg 911.186Smaxvi386func.o: assym.h 921.186Smaxvlinux_sigcode.o lock_stubs.o: assym.h 931.177Sdslcpufunc.o cpu_in_cksum.o pnpbioscall.o bioscall.o: assym.h 941.132Ssimonbmptramp.o: assym.h 951.178Sdslacpi_wakeup_low.o busfunc.o: assym.h 961.119Satatat 971.119Satatat## 981.119Satatat## (7) misc settings 991.119Satatat## 1001.119Satatat 1011.165Stsutsui.if !make(obj) && !make(clean) && !make(cleandir) 1021.187Schristos.BEGIN:: 1031.187Schristos -@rm -f i386 && \ 1041.159Smrg ln -s $S/arch/i386/include i386 1051.159Smrg.endif 1061.159Smrg 1071.119Satatat## 1081.119Satatat## (8) config(8) generated machinery 1091.119Satatat## 1101.98Smrg%INCLUDES 1111.74Smycroft 1121.1Scgd%OBJS 1131.1Scgd 1141.1Scgd%CFILES 1151.1Scgd 1161.62Smycroft%SFILES 1171.62Smycroft 1181.1Scgd%LOAD 1191.50Smycroft 1201.119Satatat%RULES 1211.1Scgd 1221.119Satatat## 1231.119Satatat## (9) port independent kernel machinery 1241.119Satatat## 1251.119Satatat.include "$S/conf/Makefile.kern.inc" 1261.135Sthorpej 1271.175Schristos## Include rules for ACPI wakecode 1281.175Schristos.include "$S/arch/x86/acpi/Makefile.wakecode.inc" 1291.175Schristos 1301.135Sthorpej## 1311.135Sthorpej## (10) Appending make options. 1321.135Sthorpej## 1331.135Sthorpej%MAKEOPTIONSAPPEND 134