1 # $NetBSD: Makefile.xen,v 1.16 2006/04/04 03:13:12 gdamore Exp $ 2 # NetBSD: Makefile.i386,v 1.132 2003/07/05 16:56:10 simonb Exp 3 4 # Makefile for NetBSD 5 # 6 # This makefile is constructed from a machine description: 7 # config machineid 8 # Most changes should be made in the machine description 9 # /sys/arch/xen/conf/``machineid'' 10 # after which you should do 11 # config machineid 12 # Machine generic makefile changes should be made in 13 # /sys/arch/xen/conf/Makefile.xen 14 # after which config should be rerun for all machines of that type. 15 # 16 # To specify debugging, add the config line: makeoptions DEBUG="-g" 17 # A better way is to specify -g only for a few files. 18 # 19 # makeoptions DEBUGLIST="uvm* trap if_*" 20 21 .include "$S/arch/xen/conf/Makefile.arch.inc" 22 MACHINE_ARCH?= i386 23 USETOOLS?= no 24 NEED_OWN_INSTALL_TARGET?=no 25 .include <bsd.own.mk> 26 27 ## 28 ## (1) port identification 29 ## 30 XEN= $S/arch/xen 31 I386= $S/arch/i386 32 GENASSYM_CONF= ${XEN}/${XEN_BUILD}/genassym.cf 33 34 ## 35 ## (2) compile settings 36 ## 37 CPPFLAGS+= -D${XEN_BUILD} 38 AFLAGS+= -x assembler-with-cpp -traditional-cpp ${DBG} 39 EXTRA_INCLUDES= -I${.CURDIR}/xen-ma 40 41 ## 42 ## (3) libkern and compat 43 ## 44 KERN_AS= obj 45 46 ## 47 ## (4) local objects, compile rules, and dependencies 48 ## 49 MD_OBJS= locore.o spl.o vector.o 50 MD_CFILES= 51 MD_SFILES= ${XEN}/${XEN_BUILD}/locore.S \ 52 ${XEN}/${XEN_BUILD}/spl.S \ 53 ${XEN}/${XEN_BUILD}/vector.S 54 55 .if ${MACHINE_ARCH} == i386 56 MD_OBJS+= copy.o 57 MD_SFILES+= ${I386}/i386/copy.S 58 59 copy.o: ${I386}/i386/copy.S assym.h 60 ${NORMAL_S} 61 .endif 62 63 locore.o: ${XEN}/${XEN_BUILD}/locore.S assym.h 64 ${NORMAL_S} 65 66 spl.o: ${XEN}/${XEN_BUILD}/spl.S assym.h 67 ${NORMAL_S} 68 69 vector.o: ${XEN}/${XEN_BUILD}/vector.S assym.h 70 ${NORMAL_S} 71 72 .ifndef noBEGIN 73 .if !make(obj) && !make(clean) && !make(cleandir) 74 .BEGIN: 75 .for A in ${XEN_MACHINE_ARCHS} 76 rm -f ${A} 77 ln -s $S/arch/${A}/include ${A} 78 .endfor 79 -rm -rf xen-ma 80 mkdir xen-ma 81 ln -s ../${XEN_BUILD} xen-ma/machine 82 .endif 83 .endif 84 85 ## 86 ## (5) link settings 87 ## 88 TEXTADDR?= c0100000 89 LINKFLAGS_NORMAL= -X 90 .if (${OBJECT_FMT} == "ELF") 91 KERN_LDSCRIPT?= kern.ldscript 92 LINKFORMAT= -T $S/arch/${XEN_BUILD}/conf/${KERN_LDSCRIPT} 93 .else 94 LINKFORMAT= -z 95 .endif 96 97 ## 98 ## (6) port specific target dependencies 99 ## 100 101 freebsd_sigcode.o ibcs2_sigcode.o linux_sigcode.o: assym.h 102 svr4_sigcode.o mach_sigcode.o: assym.h 103 apmcall.o in_cksum.o pnpbioscall.o bioscall.o: assym.h 104 mptramp.o: assym.h 105 clock.o: config_time.h 106 107 ## 108 ## (7) misc settings 109 ## 110 111 ## 112 ## (8) config(8) generated machinery 113 ## 114 %INCLUDES 115 116 %OBJS 117 118 %CFILES 119 120 %SFILES 121 122 %LOAD 123 124 %RULES 125 126 ## Include rules for Atheros WLAN 127 .include "$S/contrib/dev/ath/netbsd/Makefile.ath.inc" 128 129 ## 130 ## (9) port independent kernel machinery 131 ## 132 .include "$S/conf/Makefile.kern.inc" 133 134 ## 135 ## (10) Appending make options. 136 ## 137 %MAKEOPTIONSAPPEND 138