xref: /minix3/minix/servers/vm/Makefile (revision bf609e10121541e123a8be251042bb3d29429c59)
1433d6423SLionel Sambuc# Makefile for VM server
2433d6423SLionel Sambuc.include <bsd.own.mk>
3433d6423SLionel Sambuc
4433d6423SLionel SambucPROG=	vm
5433d6423SLionel SambucSRCS=	main.c alloc.c utility.c exit.c fork.c break.c \
6433d6423SLionel Sambuc	mmap.c slaballoc.c region.c pagefaults.c pagetable.c \
7910831cbSDavid van Moolenbroek	rs.c pb.c regionavl.c \
8433d6423SLionel Sambuc	mem_anon.c mem_directphys.c mem_anon_contig.c mem_shared.c	\
9433d6423SLionel Sambuc	mem_cache.c cache.c vfs.c mem_file.c fdref.c acl.c
10433d6423SLionel Sambuc
11433d6423SLionel Sambuc.if ${MACHINE_ARCH} == "earm"
12433d6423SLionel SambucLDFLAGS+= -T ${.CURDIR}/arch/${MACHINE_ARCH}/vm.lds
13433d6423SLionel Sambuc.endif
14433d6423SLionel Sambuc
15*bf609e10Srlfnb.if ${MKPAE:Uno} != "no"
16*bf609e10SrlfnbCPPFLAGS+= -DPAE=1
17*bf609e10Srlfnb.endif
18*bf609e10Srlfnb
19433d6423SLionel SambucDPADD+=	${LIBSYS} ${LIBEXEC}
20433d6423SLionel SambucLDADD+=	-lsys -lexec
21433d6423SLionel Sambuc
22433d6423SLionel SambucCPPFLAGS+= -I${.CURDIR} -I${.CURDIR}/arch/${MACHINE_ARCH}
23433d6423SLionel SambucCPPFLAGS+= -I${NETBSDSRCDIR}/minix
24433d6423SLionel Sambuc
2576b68f9fSDavid van Moolenbroek# For all other services, magic instrumentation involves instrumenting the
2676b68f9fSDavid van Moolenbroek# libc malloc code, hooking its nested mmap/munmap calls, and ignoring its
2776b68f9fSDavid van Moolenbroek# data. For VM, we need to do the exact opposite, since for VM, the malloc
2876b68f9fSDavid van Moolenbroek# state is transferred as is. Thus, if the magic pass is enabled, tell it
2976b68f9fSDavid van Moolenbroek# to skip the regular malloc instrumentation features.
30bcc17a81SDavid van MoolenbroekMAGICFLAGS= -magic-disable-mem-functions -magic-disable-malloc-skip
3176b68f9fSDavid van Moolenbroek
32433d6423SLionel Sambuc.include "arch/${MACHINE_ARCH}/Makefile.inc"
33433d6423SLionel Sambuc.include <minix.service.mk>
34