Files
netbsd/sys/arch/amd64/conf/Makefile.amd64
2015-10-15 10:25:28 +02:00

110 lines
2.2 KiB
Makefile

# $NetBSD: Makefile.amd64,v 1.53 2015/09/06 07:17:14 uebayasi Exp $
# Makefile for NetBSD
#
# This makefile is constructed from a machine description:
# config machineid
# Most changes should be made in the machine description
# /sys/arch/amd64/conf/``machineid''
# after which you should do
# config machineid
# Machine generic makefile changes should be made in
# /sys/arch/amd64/conf/Makefile.amd64
# after which config should be rerun for all machines of that type.
#
# To specify debugging, add the config line: makeoptions DEBUG="-g"
# A better way is to specify -g only for a few files.
#
# makeoptions DEBUGLIST="uvm* trap if_*"
MACHINE_ARCH=x86_64
USETOOLS?= no
NEED_OWN_INSTALL_TARGET?=no
.include <bsd.own.mk>
USE_SSP?= yes
##
## (1) port identification
##
AMD64= $S/arch/amd64
GENASSYM_CONF= ${AMD64}/amd64/genassym.cf
##
## (2) compile settings
##
DEFCOPTS= -O2 -fno-omit-frame-pointer
CPPFLAGS+= -Damd64 -Dx86_64
CFLAGS+= -mcmodel=kernel
# -mno-sse implies -mno-sse2 (etc), explicitly disable avx to be extra sure
CFLAGS+= -mno-red-zone -mno-mmx -mno-sse -mno-avx
# make absolutely sure we don't get x87 registers used as well
CFLAGS+= -msoft-float
# For gcc we might need this, but other compilers barf
# CFLAGS+= -mno-fp-ret-in-387
##
## (3) libkern and compat
##
OPT_MODULAR= %MODULAR%
.if !empty(OPT_MODULAR)
KERN_AS= obj
.else
KERN_AS= library
.endif
##
## (4) local objects, compile rules, and dependencies
##
##
## (5) link settings
##
TEXTADDR?= 0xffffffff80100000
EXTRA_LINKFLAGS= -z max-page-size=0x100000
LINKFLAGS_NORMAL= -X
KERNLDSCRIPT?= ${AMD64}/conf/kern.ldscript
##
## (6) port specific target dependencies
##
# depend on CPU configuration
locore.o machdep.o: Makefile
acpi_wakeup_low.o amd64func.o busfunc.o cpufunc.o cpu_in_cksum.o: assym.h
linux_support.o linux32_sigcode.o lock_stubs.o mptramp.o: assym.h
netbsd32_sigcode.o: assym.h
##
## (7) misc settings
##
##
## (8) config(8) generated machinery
##
%INCLUDES
%OBJS
%CFILES
%SFILES
%LOAD
%RULES
##
## (9) port independent kernel machinery
##
.include "$S/conf/Makefile.kern.inc"
## Include rules for ACPI wakecode
.include "$S/arch/x86/acpi/Makefile.wakecode.inc"
##
## (10) Appending make options.
##
%MAKEOPTIONSAPPEND