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

144 lines
3.1 KiB
Makefile

# $NetBSD: Makefile.xen,v 1.9 2005/06/22 06:14:51 dyoung 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_CONF= ${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}
.ifndef noBEGIN
.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
.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
# XXX - Ugly, but make doesn't easily handle .o.uue (assumes it's a suffix)
# XXX - Also, config has no simple was to just add foo.o to the Makefile.
# It needs a pathname of some sort for "object"
.if !empty(OBJS:M\/athhal-i386-elf.hal.o)
OBJS:=${OBJS:C/\/athhal-i386-elf.hal.o/athhal-i386-elf.hal.o/}
.PATH: $S/contrib/arch/i386/dev
ATH_UUDEC?= @${_MKSHMSG} "uudecode ${.CURDIR:T}/${.TARGET}"; \
${_MKSHECHO}\
${UUDECODE} -p $> \> ${.TARGET}; \
rm -f ${.TARGET}; \
${UUDECODE} -p $> > ${.TARGET}
athhal-i386-elf.hal.o: athhal-i386-elf.hal.o.uue
${ATH_UUDEC}
all depend: opt_ah.h
opt_ah.h: athhal-i386-elf.opt_ah.h
ln -s ${.ALLSRC} ${.TARGET}
.endif
##
## (9) port independent kernel machinery
##
.include "$S/conf/Makefile.kern.inc"
##
## (10) Appending make options.
##
%MAKEOPTIONSAPPEND