NetBSD/sys/arch/xen/conf/Makefile.xen

119 lines
2.4 KiB
Makefile

# $NetBSD: Makefile.xen,v 1.1 2004/03/11 21:44:08 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_*"
MACHINE_ARCH?= i386
MACHINE_ARCH2?= x86
USETOOLS?= no
NEED_OWN_INSTALL_TARGET?=no
.include <bsd.own.mk>
##
## (1) port identification
##
XEN= $S/arch/xen
XEN_MA= $S/arch/${MACHINE_ARCH}
XEN_MA2= $S/arch/${MACHINE_ARCH2}
GENASSYM= ${XEN}/${MACHINE_ARCH}/genassym.cf
##
## (2) compile settings
##
CPPFLAGS+= -D${MACHINE_ARCH}
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}/${MACHINE_ARCH}/locore.S ${XEN}/${MACHINE_ARCH}/spl.S \
${XEN}/${MACHINE_ARCH}/vector.S
locore.o: ${XEN}/${MACHINE_ARCH}/locore.S assym.h
${NORMAL_S}
spl.o: ${XEN}/${MACHINE_ARCH}/spl.S assym.h
${NORMAL_S}
vector.o: ${XEN}/${MACHINE_ARCH}/vector.S assym.h
${NORMAL_S}
.if !make(obj) && !make(clean) && !make(cleandir)
.BEGIN:
rm -f ${MACHINE_ARCH} ${MACHINE_ARCH2}
ln -s ${XEN_MA}/include ${MACHINE_ARCH}
ln -s ${XEN_MA2}/include ${MACHINE_ARCH2}
rm -rf xen-ma
mkdir xen-ma
ln -s ../${MACHINE_ARCH} xen-ma/machine
.endif
##
## (5) link settings
##
TEXTADDR?= c0100000
LINKFLAGS_NORMAL= -X
.if (${OBJECT_FMT} == "ELF")
KERN_LDSCRIPT?= kern.ldscript
LINKFORMAT= -T ${XEN_MA}/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"