Home | History | Annotate | Line # | Download | only in conf
Makefile.xen revision 1.10
      1  1.10      yamt #	$NetBSD: Makefile.xen,v 1.10 2005/11/07 11:42:34 yamt Exp $
      2   1.1        cl #	NetBSD: Makefile.i386,v 1.132 2003/07/05 16:56:10 simonb Exp 
      3   1.1        cl 
      4   1.1        cl # Makefile for NetBSD
      5   1.1        cl #
      6   1.1        cl # This makefile is constructed from a machine description:
      7   1.1        cl #	config machineid
      8   1.1        cl # Most changes should be made in the machine description
      9   1.1        cl #	/sys/arch/xen/conf/``machineid''
     10   1.1        cl # after which you should do
     11   1.1        cl #	config machineid
     12   1.1        cl # Machine generic makefile changes should be made in
     13   1.1        cl #	/sys/arch/xen/conf/Makefile.xen
     14   1.1        cl # after which config should be rerun for all machines of that type.
     15   1.1        cl #
     16   1.1        cl # To specify debugging, add the config line: makeoptions DEBUG="-g"
     17   1.1        cl # A better way is to specify -g only for a few files.
     18   1.1        cl #
     19   1.1        cl #	makeoptions DEBUGLIST="uvm* trap if_*"
     20   1.1        cl 
     21   1.2        cl .include "$S/arch/xen/conf/Makefile.arch.inc"
     22   1.1        cl MACHINE_ARCH?=	i386
     23   1.1        cl USETOOLS?=	no
     24   1.1        cl NEED_OWN_INSTALL_TARGET?=no
     25   1.1        cl .include <bsd.own.mk>
     26   1.1        cl 
     27   1.1        cl ##
     28   1.1        cl ## (1) port identification
     29   1.1        cl ##
     30   1.1        cl XEN=		$S/arch/xen
     31  1.10      yamt I386=		$S/arch/i386
     32   1.6  christos GENASSYM_CONF=	${XEN}/${XEN_BUILD}/genassym.cf
     33   1.1        cl 
     34   1.1        cl ##
     35   1.1        cl ## (2) compile settings
     36   1.1        cl ##
     37   1.2        cl CPPFLAGS+=	-D${XEN_BUILD}
     38   1.1        cl AFLAGS+=	-x assembler-with-cpp -traditional-cpp ${DBG}
     39   1.1        cl EXTRA_INCLUDES=	-I${.CURDIR}/xen-ma
     40   1.1        cl 
     41   1.1        cl ##
     42   1.1        cl ## (3) libkern and compat
     43   1.1        cl ##
     44   1.1        cl KERN_AS=	obj
     45   1.1        cl 
     46   1.1        cl ##
     47   1.1        cl ## (4) local objects, compile rules, and dependencies
     48   1.1        cl ##
     49   1.1        cl MD_OBJS=	locore.o spl.o vector.o
     50   1.1        cl MD_CFILES=
     51  1.10      yamt MD_SFILES=	${XEN}/${XEN_BUILD}/locore.S \
     52  1.10      yamt 		${XEN}/${XEN_BUILD}/spl.S \
     53   1.2        cl 		${XEN}/${XEN_BUILD}/vector.S
     54   1.1        cl 
     55  1.10      yamt .if ${MACHINE_ARCH} == i386
     56  1.10      yamt MD_OBJS+=	copy.o
     57  1.10      yamt MD_CFILES+=	${I386}/i386/copy.S
     58  1.10      yamt 
     59  1.10      yamt copy.o: ${I386}/i386/copy.S assym.h
     60  1.10      yamt 	${NORMAL_S}
     61  1.10      yamt .endif
     62  1.10      yamt 
     63   1.2        cl locore.o: ${XEN}/${XEN_BUILD}/locore.S assym.h
     64   1.1        cl 	${NORMAL_S}
     65   1.1        cl 
     66   1.2        cl spl.o: ${XEN}/${XEN_BUILD}/spl.S assym.h
     67   1.1        cl 	${NORMAL_S}
     68   1.1        cl 
     69   1.2        cl vector.o: ${XEN}/${XEN_BUILD}/vector.S assym.h
     70   1.1        cl 	${NORMAL_S}
     71   1.1        cl 
     72   1.7       sjg .ifndef noBEGIN
     73   1.1        cl .if !make(obj) && !make(clean) && !make(cleandir)
     74   1.1        cl .BEGIN:
     75   1.2        cl .for A in ${XEN_MACHINE_ARCHS}
     76   1.2        cl 	rm -f ${A}
     77   1.2        cl 	ln -s $S/arch/${A}/include ${A}
     78   1.2        cl .endfor
     79   1.5       jmc 	-rm -rf xen-ma
     80   1.1        cl 	mkdir xen-ma
     81   1.3        cl 	ln -s ../${XEN_BUILD} xen-ma/machine
     82   1.1        cl .endif
     83   1.7       sjg .endif
     84   1.1        cl 
     85   1.1        cl ##
     86   1.1        cl ## (5) link settings
     87   1.1        cl ##
     88   1.1        cl TEXTADDR?=	c0100000
     89   1.1        cl LINKFLAGS_NORMAL=	-X
     90   1.1        cl .if (${OBJECT_FMT} == "ELF")
     91   1.1        cl KERN_LDSCRIPT?=	kern.ldscript
     92   1.2        cl LINKFORMAT=	-T $S/arch/${XEN_BUILD}/conf/${KERN_LDSCRIPT}
     93   1.1        cl .else
     94   1.1        cl LINKFORMAT=	-z
     95   1.1        cl .endif
     96   1.1        cl 
     97   1.1        cl ##
     98   1.1        cl ## (6) port specific target dependencies
     99   1.1        cl ##
    100   1.1        cl 
    101   1.1        cl freebsd_sigcode.o ibcs2_sigcode.o linux_sigcode.o: assym.h
    102   1.1        cl svr4_sigcode.o mach_sigcode.o: assym.h
    103   1.1        cl apmcall.o in_cksum.o pnpbioscall.o bioscall.o: assym.h
    104   1.1        cl mptramp.o: assym.h
    105   1.1        cl clock.o: config_time.h
    106   1.1        cl 
    107   1.1        cl ##
    108   1.1        cl ## (7) misc settings
    109   1.1        cl ##
    110   1.1        cl 
    111   1.1        cl ##
    112   1.1        cl ## (8) config(8) generated machinery
    113   1.1        cl ##
    114   1.1        cl %INCLUDES
    115   1.1        cl 
    116   1.1        cl %OBJS
    117   1.1        cl 
    118   1.1        cl %CFILES
    119   1.1        cl 
    120   1.1        cl %SFILES
    121   1.1        cl 
    122   1.1        cl %LOAD
    123   1.1        cl 
    124   1.1        cl %RULES
    125   1.1        cl 
    126   1.8       chs # XXX - Ugly, but make doesn't easily handle .o.uue (assumes it's a suffix)
    127   1.8       chs # XXX - Also, config has no simple was to just add foo.o to the Makefile. 
    128   1.8       chs #       It needs a pathname of some sort for "object"        
    129   1.9    dyoung .if !empty(OBJS:M\/athhal-i386-elf.hal.o)
    130   1.9    dyoung OBJS:=${OBJS:C/\/athhal-i386-elf.hal.o/athhal-i386-elf.hal.o/}
    131   1.8       chs  
    132   1.9    dyoung .PATH: $S/contrib/arch/i386/dev
    133   1.8       chs ATH_UUDEC?=	@${_MKSHMSG} "uudecode ${.CURDIR:T}/${.TARGET}"; \
    134   1.8       chs 		${_MKSHECHO}\
    135   1.8       chs 		${UUDECODE} -p $> \> ${.TARGET}; \
    136   1.8       chs 		rm -f ${.TARGET}; \
    137   1.8       chs 		${UUDECODE} -p $> > ${.TARGET}
    138   1.9    dyoung athhal-i386-elf.hal.o: athhal-i386-elf.hal.o.uue
    139   1.8       chs 	${ATH_UUDEC}
    140   1.9    dyoung all depend:	opt_ah.h
    141   1.9    dyoung opt_ah.h:	athhal-i386-elf.opt_ah.h
    142   1.9    dyoung 	ln -s ${.ALLSRC} ${.TARGET}
    143   1.8       chs .endif
    144   1.8       chs 
    145   1.1        cl ##
    146   1.1        cl ## (9) port independent kernel machinery
    147   1.1        cl ##
    148   1.1        cl .include "$S/conf/Makefile.kern.inc"
    149   1.4   thorpej 
    150   1.4   thorpej ##
    151   1.4   thorpej ## (10) Appending make options.
    152   1.4   thorpej ##
    153   1.4   thorpej %MAKEOPTIONSAPPEND
    154