Home | History | Annotate | Line # | Download | only in conf
Makefile.xen revision 1.48.10.1
      1  1.48.10.1    bouyer #	$NetBSD: Makefile.xen,v 1.48.10.1 2020/04/16 08:46:35 bouyer 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 USETOOLS?=	no
     23        1.1        cl NEED_OWN_INSTALL_TARGET?=no
     24       1.46  christos NORELRO=
     25       1.46  christos NOSANITIZER=
     26       1.46  christos .include <bsd.init.mk>
     27        1.1        cl 
     28       1.29      tron USE_SSP?=	yes
     29       1.29      tron 
     30        1.1        cl ##
     31        1.1        cl ## (1) port identification
     32        1.1        cl ##
     33        1.1        cl XEN=		$S/arch/xen
     34       1.10      yamt I386=		$S/arch/i386
     35       1.20    bouyer AMD64=          $S/arch/amd64
     36       1.20    bouyer GENASSYM_CONF=	$S/arch/${XEN_BUILD}/${XEN_BUILD}/genassym.cf
     37       1.20    bouyer 
     38       1.24    bouyer ARCH_INC=	$S/arch/xen/include/${XEN_BUILD}
     39        1.1        cl 
     40        1.1        cl ##
     41        1.1        cl ## (2) compile settings
     42        1.1        cl ##
     43        1.2        cl CPPFLAGS+=	-D${XEN_BUILD}
     44       1.31     joerg AFLAGS+=	-x assembler-with-cpp ${DBG} -D__XEN__
     45       1.48    cherry EXTRA_INCLUDES=	-I${.CURDIR}/xen-ma -I$S/external/mit/xen-include-public/dist/
     46        1.1        cl 
     47       1.20    bouyer .if ${XEN_BUILD} == "amd64"
     48       1.36    bouyer DEFCOPTS=	-O2 -fno-omit-frame-pointer
     49       1.20    bouyer CPPFLAGS+=	-Dx86_64
     50       1.20    bouyer CFLAGS+=	-mcmodel=kernel
     51       1.36    bouyer CFLAGS+=	-mno-red-zone -mno-mmx -mno-sse -mno-avx
     52       1.36    bouyer CFLAGS+=	-msoft-float
     53       1.37     joerg CFLAGS+=	${${ACTIVE_CC} == "gcc":?  -mno-fp-ret-in-387 :}
     54       1.20    bouyer .endif
     55       1.20    bouyer 
     56       1.36    bouyer .if ${XEN_BUILD} == "i386"
     57       1.36    bouyer DEFCOPTS=	-O2 -fno-omit-frame-pointer
     58       1.36    bouyer CFLAGS+=	-msoft-float
     59       1.36    bouyer CFLAGS+=	-mno-mmx -mno-sse -mno-avx
     60       1.36    bouyer .endif
     61       1.20    bouyer 
     62        1.1        cl ##
     63        1.1        cl ## (3) libkern and compat
     64        1.1        cl ##
     65       1.47       rin OPT_MODULAR=	%MODULAR%
     66        1.1        cl 
     67        1.1        cl ##
     68        1.1        cl ## (4) local objects, compile rules, and dependencies
     69        1.1        cl ##
     70  1.48.10.1    bouyer 
     71  1.48.10.1    bouyer MD_OBJS=
     72  1.48.10.1    bouyer .if ${XEN_BUILD} == i386
     73  1.48.10.1    bouyer MD_OBJS+=	locore.o spl.o copy.o vector.o lock_stubs.o
     74       1.45      maxv .endif
     75        1.1        cl MD_CFILES=
     76       1.20    bouyer 
     77  1.48.10.1    bouyer MD_SFILES=
     78  1.48.10.1    bouyer .if ${XEN_BUILD} == i386
     79  1.48.10.1    bouyer MD_SFILES+=	$S/arch/${XEN_BUILD}/${XEN_BUILD}/locore.S \
     80       1.24    bouyer 		$S/arch/${XEN_BUILD}/${XEN_BUILD}/spl.S \
     81       1.24    bouyer 		$S/arch/${XEN_BUILD}/${XEN_BUILD}/vector.S \
     82  1.48.10.1    bouyer 		$S/arch/${XEN_BUILD}/${XEN_BUILD}/copy.S \
     83  1.48.10.1    bouyer 		$S/arch/${XEN_BUILD}/${XEN_BUILD}/lock_stubs.S
     84       1.20    bouyer 
     85       1.45      maxv .endif
     86       1.45      maxv 
     87  1.48.10.1    bouyer .if ${XEN_BUILD} == i386
     88       1.24    bouyer copy.o: $S/arch/${XEN_BUILD}/${XEN_BUILD}/copy.S assym.h
     89       1.20    bouyer 	${NORMAL_S}
     90       1.20    bouyer 
     91       1.24    bouyer locore.o: $S/arch/${XEN_BUILD}/${XEN_BUILD}/locore.S assym.h
     92       1.20    bouyer 	${NORMAL_S}
     93       1.20    bouyer 
     94       1.24    bouyer spl.o: $S/arch/${XEN_BUILD}/${XEN_BUILD}/spl.S assym.h
     95       1.20    bouyer 	${NORMAL_S}
     96       1.20    bouyer 
     97       1.24    bouyer vector.o: $S/arch/${XEN_BUILD}/${XEN_BUILD}/vector.S assym.h
     98       1.20    bouyer 	${NORMAL_S}
     99       1.45      maxv 
    100  1.48.10.1    bouyer lock_stubs.o: $S/arch/${XEN_BUILD}/${XEN_BUILD}/lock_stubs.S assym.h
    101       1.45      maxv 	${NORMAL_S}
    102       1.45      maxv .endif
    103       1.45      maxv 
    104        1.7       sjg .ifndef noBEGIN
    105        1.1        cl .if !make(obj) && !make(clean) && !make(cleandir)
    106       1.43  christos .BEGIN::
    107        1.2        cl .for A in ${XEN_MACHINE_ARCHS}
    108       1.43  christos 	-@rm -f ${A} && \
    109       1.43  christos 	    ln -s $S/arch/${A}/include ${A}
    110        1.2        cl .endfor
    111       1.43  christos 	-@rm -rf xen-ma && \
    112       1.44  pgoyette 	    mkdir xen-ma && ln -s ../${XEN_BUILD} xen-ma/machine
    113       1.43  christos 	-@rm -f machine && \
    114       1.43  christos 	    ln -s ${ARCH_INC} machine
    115        1.1        cl .endif
    116        1.7       sjg .endif
    117        1.1        cl 
    118        1.1        cl ##
    119        1.1        cl ## (5) link settings
    120        1.1        cl ##
    121       1.20    bouyer .if ${XEN_BUILD} == i386
    122       1.20    bouyer TEXTADDR?=	0xc0100000
    123       1.20    bouyer .elif ${XEN_BUILD} == amd64
    124       1.41      maxv TEXTADDR?=	0xffffffff80200000
    125       1.20    bouyer .endif
    126        1.1        cl LINKFLAGS_NORMAL=	-X
    127       1.39  uebayasi KERNLDSCRIPT?=	$S/arch/${XEN_BUILD}/conf/kern.ldscript.Xen
    128        1.1        cl 
    129        1.1        cl ##
    130        1.1        cl ## (6) port specific target dependencies
    131        1.1        cl ##
    132        1.1        cl 
    133       1.20    bouyer .if ${XEN_BUILD} == i386
    134       1.42      maxv linux_sigcode.o: assym.h
    135       1.42      maxv pnpbioscall.o bioscall.o: assym.h
    136        1.1        cl mptramp.o: assym.h
    137       1.20    bouyer .elif  ${XEN_BUILD} == amd64
    138       1.20    bouyer locore.o machdep.o: Makefile
    139       1.42      maxv linux32_sigcode.o netbsd32_sigcode.o: assym.h
    140       1.20    bouyer .endif
    141       1.26     joerg busfunc.o cpu_in_cksum.o cpufunc.o lock_stubs.o: assym.h
    142        1.1        cl 
    143        1.1        cl ##
    144        1.1        cl ## (7) misc settings
    145        1.1        cl ##
    146        1.1        cl 
    147        1.1        cl ##
    148        1.1        cl ## (8) config(8) generated machinery
    149        1.1        cl ##
    150        1.1        cl %INCLUDES
    151        1.1        cl 
    152        1.1        cl %OBJS
    153        1.1        cl 
    154        1.1        cl %CFILES
    155        1.1        cl 
    156        1.1        cl %SFILES
    157        1.1        cl 
    158        1.1        cl %LOAD
    159        1.1        cl 
    160        1.1        cl %RULES
    161        1.1        cl 
    162        1.1        cl ##
    163        1.1        cl ## (9) port independent kernel machinery
    164        1.1        cl ##
    165        1.1        cl .include "$S/conf/Makefile.kern.inc"
    166        1.4   thorpej 
    167        1.4   thorpej ##
    168        1.4   thorpej ## (10) Appending make options.
    169        1.4   thorpej ##
    170        1.4   thorpej %MAKEOPTIONSAPPEND
    171