Makefile.i386 revision 1.141
1# $NetBSD: Makefile.i386,v 1.141 2005/11/07 11:42:34 yamt 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## 40.if !empty(IDENT:M-DLKM) 41KERN_AS= obj 42.else 43KERN_AS= library 44.endif 45 46## 47## (4) local objects, compile rules, and dependencies 48## 49MD_OBJS= locore.o copy.o spl.o vector.o microtime.o 50MD_CFILES= 51MD_SFILES= ${I386}/i386/locore.S ${I386}/i386/copy.S ${I386}/i386/spl.S \ 52 ${I386}/i386/vector.S ${I386}/i386/microtime.S 53 54locore.o: ${I386}/i386/locore.S assym.h 55 ${NORMAL_S} 56 57copy.o: ${I386}/i386/copy.S assym.h 58 ${NORMAL_S} 59 60spl.o: ${I386}/i386/spl.S assym.h 61 ${NORMAL_S} 62 63vector.o: ${I386}/i386/vector.S assym.h 64 ${NORMAL_S} 65 66microtime.o: ${I386}/i386/microtime.S assym.h 67 ${NORMAL_S} 68 69## 70## (5) link settings 71## 72TEXTADDR?= c0100000 73LINKFLAGS_NORMAL= -X 74.if (${OBJECT_FMT} == "ELF") 75KERN_LDSCRIPT?= kern.ldscript 76LINKFORMAT= -T ${I386}/conf/${KERN_LDSCRIPT} 77.else 78LINKFORMAT= -z 79.endif 80 81## 82## (6) port specific target dependencies 83## 84 85freebsd_sigcode.o ibcs2_sigcode.o linux_sigcode.o: assym.h 86svr4_sigcode.o mach_sigcode.o: assym.h 87apmcall.o in_cksum.o pnpbioscall.o bioscall.o: assym.h 88mptramp.o: assym.h 89clock.o: config_time.h 90 91## 92## (7) misc settings 93## 94 95## 96## (8) config(8) generated machinery 97## 98%INCLUDES 99 100%OBJS 101 102%CFILES 103 104%SFILES 105 106%LOAD 107 108%RULES 109 110# XXX - Ugly, but make doesn't easily handle .o.uue (assumes it's a suffix) 111# XXX - Also, config has no simple was to just add foo.o to the Makefile. 112# It needs a pathname of some sort for "object" 113.if !empty(OBJS:M\/athhal-i386-elf.hal.o) 114OBJS:=${OBJS:C/\/athhal-i386-elf.hal.o/athhal-i386-elf.hal.o/} 115 116.PATH: $S/contrib/arch/i386/dev 117ATH_UUDEC?= @${_MKSHMSG} "uudecode ${.CURDIR:T}/${.TARGET}"; \ 118 ${_MKSHECHO}\ 119 ${UUDECODE} -p $> \> ${.TARGET}; \ 120 rm -f ${.TARGET}; \ 121 ${UUDECODE} -p $> > ${.TARGET} 122athhal-i386-elf.hal.o: athhal-i386-elf.hal.o.uue 123 ${ATH_UUDEC} 124.endif 125 126## 127## (9) port independent kernel machinery 128## 129.include "$S/conf/Makefile.kern.inc" 130 131## 132## (10) Appending make options. 133## 134%MAKEOPTIONSAPPEND 135