Makefile.i386 revision 1.164
1# $NetBSD: Makefile.i386,v 1.164 2009/02/15 01:58:01 cube 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 25## 26## (1) port identification 27## 28I386= $S/arch/i386 29GENASSYM_CONF= ${I386}/i386/genassym.cf 30 31## 32## (2) compile settings 33## 34CPPFLAGS+= -Di386 35AFLAGS+= -x assembler-with-cpp -traditional-cpp 36 37## 38## (3) libkern and compat 39## 40OPT_MODULAR= %MODULAR% 41.if !empty(OPT_MODULAR) 42KERN_AS= obj 43.else 44KERN_AS= library 45.endif 46 47## 48## (4) local objects, compile rules, and dependencies 49## 50MD_OBJS= locore.o copy.o spl.o vector.o lock_stubs.o 51MD_CFILES= 52MD_SFILES= ${I386}/i386/locore.S ${I386}/i386/copy.S ${I386}/i386/spl.S \ 53 ${I386}/i386/vector.S ${I386}/i386/lock_stubs.S 54 55locore.o: ${I386}/i386/locore.S assym.h 56 ${NORMAL_S} 57 58copy.o: ${I386}/i386/copy.S assym.h 59 ${NORMAL_S} 60 61spl.o: ${I386}/i386/spl.S assym.h 62 ${NORMAL_S} 63 64vector.o: ${I386}/i386/vector.S assym.h 65 ${NORMAL_S} 66 67lock_stubs.o: ${I386}/i386/lock_stubs.S assym.h 68 ${NORMAL_S} 69 70## 71## (5) link settings 72## 73TEXTADDR?= c0100000 74LINKFLAGS_NORMAL= -X 75.if (${OBJECT_FMT} == "ELF") 76KERN_LDSCRIPT?= kern.ldscript 77LINKFORMAT= -T ${I386}/conf/${KERN_LDSCRIPT} 78.else 79LINKFORMAT= -z 80.endif 81 82## 83## (6) port specific target dependencies 84## 85 86freebsd_sigcode.o i386func.o ibcs2_sigcode.o linux_support.o: assym.h 87linux_sigcode.o lock_stubs.o svr4_sigcode.o mach_sigcode.o: assym.h 88apmcall.o cpufunc.o cpu_in_cksum.o pnpbioscall.o bioscall.o: assym.h 89mptramp.o: assym.h 90acpi_wakeup_low.o busfunc.o kvm86call.o: assym.h 91 92## 93## (7) misc settings 94## 95 96# define .MAIN _before_ the make() check, so that implicit target 97# would be defined 98.MAIN: all 99 100.if make(depend) || make(all) || make(dependall) 101.BEGIN: 102 @rm -f i386 && \ 103 ln -s $S/arch/i386/include i386 104.endif 105 106## 107## (8) config(8) generated machinery 108## 109%INCLUDES 110 111%OBJS 112 113%CFILES 114 115%SFILES 116 117%LOAD 118 119%RULES 120 121## Include rules for ACPI wakecode 122.include "$S/arch/x86/acpi/Makefile.wakecode.inc" 123 124## 125## (9) port independent kernel machinery 126## 127.include "$S/conf/Makefile.kern.inc" 128 129## 130## (10) Appending make options. 131## 132%MAKEOPTIONSAPPEND 133