Makefile.amd64 revision 1.25
11.25Sjoerg# $NetBSD: Makefile.amd64,v 1.25 2008/10/30 20:07:01 joerg Exp $ 21.1Sfvdl 31.1Sfvdl# Makefile for NetBSD 41.1Sfvdl# 51.1Sfvdl# This makefile is constructed from a machine description: 61.1Sfvdl# config machineid 71.1Sfvdl# Most changes should be made in the machine description 81.1Sfvdl# /sys/arch/amd64/conf/``machineid'' 91.1Sfvdl# after which you should do 101.1Sfvdl# config machineid 111.1Sfvdl# Machine generic makefile changes should be made in 121.1Sfvdl# /sys/arch/amd64/conf/Makefile.amd64 131.1Sfvdl# after which config should be rerun for all machines of that type. 141.1Sfvdl# 151.1Sfvdl# To specify debugging, add the config line: makeoptions DEBUG="-g" 161.1Sfvdl# A better way is to specify -g only for a few files. 171.1Sfvdl# 181.1Sfvdl# makeoptions DEBUGLIST="uvm* trap if_*" 191.1Sfvdl 201.1SfvdlMACHINE_ARCH=x86_64 211.1SfvdlUSETOOLS?= no 221.1SfvdlNEED_OWN_INSTALL_TARGET?=no 231.1Sfvdl.include <bsd.own.mk> 241.1Sfvdl 251.1Sfvdl## 261.1Sfvdl## (1) port identification 271.1Sfvdl## 281.1SfvdlAMD64= $S/arch/amd64 291.6SchristosGENASSYM_CONF= ${AMD64}/amd64/genassym.cf 301.1Sfvdl 311.1Sfvdl## 321.1Sfvdl## (2) compile settings 331.1Sfvdl## 341.2SfvdlDEFCOPTS= -O2 351.1SfvdlCPPFLAGS+= -Damd64 -Dx86_64 361.1SfvdlCFLAGS+= -mcmodel=kernel 371.1SfvdlCFLAGS+= -mno-red-zone 381.1SfvdlAFLAGS+= -x assembler-with-cpp -traditional-cpp 391.1Sfvdl 401.1Sfvdl## 411.1Sfvdl## (3) libkern and compat 421.1Sfvdl## 431.1SfvdlKERN_AS= obj 441.1Sfvdl 451.1Sfvdl## 461.1Sfvdl## (4) local objects, compile rules, and dependencies 471.1Sfvdl## 481.14SkardelMD_OBJS= locore.o vector.o copy.o spl.o 491.1SfvdlMD_CFILES= 501.1SfvdlMD_SFILES= ${AMD64}/amd64/locore.S ${AMD64}/amd64/vector.S \ 511.14Skardel ${AMD64}/amd64/copy.S ${AMD64}/amd64/spl.S 521.1Sfvdl 531.1Sfvdllocore.o: ${AMD64}/amd64/locore.S assym.h 541.1Sfvdl ${NORMAL_S} 551.1Sfvdl 561.1Sfvdlvector.o: ${AMD64}/amd64/vector.S assym.h 571.1Sfvdl ${NORMAL_S} 581.1Sfvdl 591.1Sfvdlcopy.o: ${AMD64}/amd64/copy.S assym.h 601.1Sfvdl ${NORMAL_S} 611.1Sfvdl 621.1Sfvdlspl.o: ${AMD64}/amd64/spl.S assym.h 631.1Sfvdl ${NORMAL_S} 641.1Sfvdl 651.1Sfvdl## 661.1Sfvdl## (5) link settings 671.1Sfvdl## 681.1SfvdlTEXTADDR?= 0xffffffff80100000 691.1SfvdlLINKFLAGS_NORMAL= -X 701.1SfvdlKERN_LDSCRIPT?= kern.ldscript 711.1SfvdlLINKFORMAT= -T ${AMD64}/conf/${KERN_LDSCRIPT} 721.1Sfvdl 731.1Sfvdl## 741.1Sfvdl## (6) port specific target dependencies 751.1Sfvdl## 761.1Sfvdl 771.1Sfvdl# depend on CPU configuration 781.1Sfvdllocore.o machdep.o: Makefile 791.1Sfvdl 801.25Sjoergacpi_wakeup_low.o amd64func.o busfunc.o cpufunc.o cpu_in_cksum.o: assym.h 811.25Sjoerglinux_support.o linux32_sigcode.o lock_stubs.o mptramp.o: assym.h 821.25Sjoergnetbsd32_sigcode.o: assym.h 831.1Sfvdl 841.1Sfvdl## 851.1Sfvdl## (7) misc settings 861.1Sfvdl## 871.1Sfvdl 881.1Sfvdl## 891.1Sfvdl## (8) config(8) generated machinery 901.1Sfvdl## 911.1Sfvdl%INCLUDES 921.1Sfvdl 931.1Sfvdl%OBJS 941.1Sfvdl 951.1Sfvdl%CFILES 961.1Sfvdl 971.1Sfvdl%SFILES 981.1Sfvdl 991.1Sfvdl%LOAD 1001.1Sfvdl 1011.1Sfvdl%RULES 1021.13Sgdamore## Include rules for Atheros WLAN 1031.13Sgdamore.include "$S/contrib/dev/ath/netbsd/Makefile.ath.inc" 1041.18Sjmcneill.include "$S/arch/x86/acpi/Makefile.wakecode.inc" 1051.1Sfvdl 1061.12Sgdamore# XXX - Ugly, but make doesn't easily handle .o.uu (assumes it's a suffix) 1071.7Ssekiya# XXX - Also, config has no simple was to just add foo.o to the Makefile. 1081.7Ssekiya# It needs a pathname of some sort for "object" 1091.13Sgdamore.if !empty(OBJS:M\/athhal.o) 1101.13SgdamoreOBJS:=${OBJS:C/\/athhal.o/athhal.o/} 1111.7Ssekiya 1121.12Sgdamore.PATH: $S/contrib/dev/ath/public 1131.7SsekiyaATH_UUDEC?= @${_MKSHMSG} "uudecode ${.CURDIR:T}/${.TARGET}"; \ 1141.7Ssekiya ${_MKSHECHO}\ 1151.7Ssekiya ${UUDECODE} -p $> \> ${.TARGET}; \ 1161.7Ssekiya rm -f ${.TARGET}; \ 1171.7Ssekiya ${UUDECODE} -p $> > ${.TARGET} 1181.8Sdsl 1191.13Sgdamoreathhal.o: x86_64-elf.hal.o.uu 1201.7Ssekiya ${ATH_UUDEC} 1211.9Sdsl.if defined(COPTS) && !empty(COPTS:M-fno-asynchronous-unwind-tables) 1221.8Sdsl ${_MKSHECHO}\ 1231.9Sdsl ${OBJCOPY} -R .eh_frame $@ 1241.9Sdsl ${OBJCOPY} -R .eh_frame $@ 1251.8Sdsl.endif 1261.7Ssekiya.endif 1271.7Ssekiya 1281.1Sfvdl## 1291.1Sfvdl## (9) port independent kernel machinery 1301.1Sfvdl## 1311.1Sfvdl.include "$S/conf/Makefile.kern.inc" 1321.5Sthorpej 1331.5Sthorpej## 1341.5Sthorpej## (10) Appending make options. 1351.5Sthorpej## 1361.5Sthorpej%MAKEOPTIONSAPPEND 137