Home | History | Annotate | Line # | Download | only in conf
Makefile.xen revision 1.1
      1 #	$NetBSD: Makefile.xen,v 1.1 2004/03/11 21:44:08 cl 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 MACHINE_ARCH?=	i386
     22 MACHINE_ARCH2?=	x86
     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 XEN_MA=		$S/arch/${MACHINE_ARCH}
     32 XEN_MA2=	$S/arch/${MACHINE_ARCH2}
     33 GENASSYM=	${XEN}/${MACHINE_ARCH}/genassym.cf
     34 
     35 ##
     36 ## (2) compile settings
     37 ##
     38 CPPFLAGS+=	-D${MACHINE_ARCH}
     39 AFLAGS+=	-x assembler-with-cpp -traditional-cpp ${DBG}
     40 EXTRA_INCLUDES=	-I${.CURDIR}/xen-ma
     41 
     42 ##
     43 ## (3) libkern and compat
     44 ##
     45 KERN_AS=	obj
     46 
     47 ##
     48 ## (4) local objects, compile rules, and dependencies
     49 ##
     50 MD_OBJS=	locore.o spl.o vector.o
     51 MD_CFILES=
     52 MD_SFILES=	${XEN}/${MACHINE_ARCH}/locore.S ${XEN}/${MACHINE_ARCH}/spl.S \
     53 		${XEN}/${MACHINE_ARCH}/vector.S
     54 
     55 locore.o: ${XEN}/${MACHINE_ARCH}/locore.S assym.h
     56 	${NORMAL_S}
     57 
     58 spl.o: ${XEN}/${MACHINE_ARCH}/spl.S assym.h
     59 	${NORMAL_S}
     60 
     61 vector.o: ${XEN}/${MACHINE_ARCH}/vector.S assym.h
     62 	${NORMAL_S}
     63 
     64 .if !make(obj) && !make(clean) && !make(cleandir)
     65 .BEGIN:
     66 	rm -f ${MACHINE_ARCH} ${MACHINE_ARCH2}
     67 	ln -s ${XEN_MA}/include ${MACHINE_ARCH}
     68 	ln -s ${XEN_MA2}/include ${MACHINE_ARCH2}
     69 	rm -rf xen-ma
     70 	mkdir xen-ma
     71 	ln -s ../${MACHINE_ARCH} xen-ma/machine
     72 .endif
     73 
     74 ##
     75 ## (5) link settings
     76 ##
     77 TEXTADDR?=	c0100000
     78 LINKFLAGS_NORMAL=	-X
     79 .if (${OBJECT_FMT} == "ELF")
     80 KERN_LDSCRIPT?=	kern.ldscript
     81 LINKFORMAT=	-T ${XEN_MA}/conf/${KERN_LDSCRIPT}
     82 .else
     83 LINKFORMAT=	-z
     84 .endif
     85 
     86 ##
     87 ## (6) port specific target dependencies
     88 ##
     89 
     90 freebsd_sigcode.o ibcs2_sigcode.o linux_sigcode.o: assym.h
     91 svr4_sigcode.o mach_sigcode.o: assym.h
     92 apmcall.o in_cksum.o pnpbioscall.o bioscall.o: assym.h
     93 mptramp.o: assym.h
     94 clock.o: config_time.h
     95 
     96 ##
     97 ## (7) misc settings
     98 ##
     99 
    100 ##
    101 ## (8) config(8) generated machinery
    102 ##
    103 %INCLUDES
    104 
    105 %OBJS
    106 
    107 %CFILES
    108 
    109 %SFILES
    110 
    111 %LOAD
    112 
    113 %RULES
    114 
    115 ##
    116 ## (9) port independent kernel machinery
    117 ##
    118 .include "$S/conf/Makefile.kern.inc"
    119