Makefile.i386 revision 1.163
1# $NetBSD: Makefile.i386,v 1.163 2009/02/14 16:53:55 apb 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 != ${TOOL_AWK} '/^\#define[ \t]MODULAR/ {x=$$3} END {print x}' \ 41 opt_modular.h 42.if !empty(OPT_MODULAR) 43KERN_AS= obj 44.else 45KERN_AS= library 46.endif 47 48## 49## (4) local objects, compile rules, and dependencies 50## 51MD_OBJS= locore.o copy.o spl.o vector.o lock_stubs.o 52MD_CFILES= 53MD_SFILES= ${I386}/i386/locore.S ${I386}/i386/copy.S ${I386}/i386/spl.S \ 54 ${I386}/i386/vector.S ${I386}/i386/lock_stubs.S 55 56locore.o: ${I386}/i386/locore.S assym.h 57 ${NORMAL_S} 58 59copy.o: ${I386}/i386/copy.S assym.h 60 ${NORMAL_S} 61 62spl.o: ${I386}/i386/spl.S assym.h 63 ${NORMAL_S} 64 65vector.o: ${I386}/i386/vector.S assym.h 66 ${NORMAL_S} 67 68lock_stubs.o: ${I386}/i386/lock_stubs.S assym.h 69 ${NORMAL_S} 70 71## 72## (5) link settings 73## 74TEXTADDR?= c0100000 75LINKFLAGS_NORMAL= -X 76.if (${OBJECT_FMT} == "ELF") 77KERN_LDSCRIPT?= kern.ldscript 78LINKFORMAT= -T ${I386}/conf/${KERN_LDSCRIPT} 79.else 80LINKFORMAT= -z 81.endif 82 83## 84## (6) port specific target dependencies 85## 86 87freebsd_sigcode.o i386func.o ibcs2_sigcode.o linux_support.o: assym.h 88linux_sigcode.o lock_stubs.o svr4_sigcode.o mach_sigcode.o: assym.h 89apmcall.o cpufunc.o cpu_in_cksum.o pnpbioscall.o bioscall.o: assym.h 90mptramp.o: assym.h 91acpi_wakeup_low.o busfunc.o kvm86call.o: assym.h 92 93## 94## (7) misc settings 95## 96 97# define .MAIN _before_ the make() check, so that implicit target 98# would be defined 99.MAIN: all 100 101.if make(depend) || make(all) || make(dependall) 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## Include rules for ACPI wakecode 123.include "$S/arch/x86/acpi/Makefile.wakecode.inc" 124 125## 126## (9) port independent kernel machinery 127## 128.include "$S/conf/Makefile.kern.inc" 129 130## 131## (10) Appending make options. 132## 133%MAKEOPTIONSAPPEND 134