NetBSD/sys/arch/xen/conf/Makefile.xen
2004-05-14 14:07:46 +00:00

118 lines
2.3 KiB
Makefile

# $NetBSD: Makefile.xen,v 1.3 2004/05/14 14:07:46 cl Exp $
# NetBSD: Makefile.i386,v 1.132 2003/07/05 16:56:10 simonb Exp
# Makefile for NetBSD
#
# This makefile is constructed from a machine description:
# config machineid
# Most changes should be made in the machine description
# /sys/arch/xen/conf/``machineid''
# after which you should do
# config machineid
# Machine generic makefile changes should be made in
# /sys/arch/xen/conf/Makefile.xen
# after which config should be rerun for all machines of that type.
#
# To specify debugging, add the config line: makeoptions DEBUG="-g"
# A better way is to specify -g only for a few files.
#
# makeoptions DEBUGLIST="uvm* trap if_*"
.include "$S/arch/xen/conf/Makefile.arch.inc"
MACHINE_ARCH?= i386
USETOOLS?= no
NEED_OWN_INSTALL_TARGET?=no
.include <bsd.own.mk>
##
## (1) port identification
##
XEN= $S/arch/xen
GENASSYM= ${XEN}/${XEN_BUILD}/genassym.cf
##
## (2) compile settings
##
CPPFLAGS+= -D${XEN_BUILD}
AFLAGS+= -x assembler-with-cpp -traditional-cpp ${DBG}
EXTRA_INCLUDES= -I${.CURDIR}/xen-ma
##
## (3) libkern and compat
##
KERN_AS= obj
##
## (4) local objects, compile rules, and dependencies
##
MD_OBJS= locore.o spl.o vector.o
MD_CFILES=
MD_SFILES= ${XEN}/${XEN_BUILD}/locore.S ${XEN}/${XEN_BUILD}/spl.S \
${XEN}/${XEN_BUILD}/vector.S
locore.o: ${XEN}/${XEN_BUILD}/locore.S assym.h
${NORMAL_S}
spl.o: ${XEN}/${XEN_BUILD}/spl.S assym.h
${NORMAL_S}
vector.o: ${XEN}/${XEN_BUILD}/vector.S assym.h
${NORMAL_S}
.if !make(obj) && !make(clean) && !make(cleandir)
.BEGIN:
.for A in ${XEN_MACHINE_ARCHS}
rm -f ${A}
ln -s $S/arch/${A}/include ${A}
.endfor
rm -rf xen-ma
mkdir xen-ma
ln -s ../${XEN_BUILD} xen-ma/machine
.endif
##
## (5) link settings
##
TEXTADDR?= c0100000
LINKFLAGS_NORMAL= -X
.if (${OBJECT_FMT} == "ELF")
KERN_LDSCRIPT?= kern.ldscript
LINKFORMAT= -T $S/arch/${XEN_BUILD}/conf/${KERN_LDSCRIPT}
.else
LINKFORMAT= -z
.endif
##
## (6) port specific target dependencies
##
freebsd_sigcode.o ibcs2_sigcode.o linux_sigcode.o: assym.h
svr4_sigcode.o mach_sigcode.o: assym.h
apmcall.o in_cksum.o pnpbioscall.o bioscall.o: assym.h
mptramp.o: assym.h
clock.o: config_time.h
##
## (7) misc settings
##
##
## (8) config(8) generated machinery
##
%INCLUDES
%OBJS
%CFILES
%SFILES
%LOAD
%RULES
##
## (9) port independent kernel machinery
##
.include "$S/conf/Makefile.kern.inc"