CPPFLAGS+= -DUSE_APIC
.endif
+.if ${USE_MCONTEXT} != "no"
+SRCS+= do_mcontext.c
+CPPFLAGS+= -DUSE_MCONTEXT
+.endif
+
+
# These come last, so the profiling buffer is at the end of the data segment
SRCS+= profile.c do_sprofile.c
#define USE_MEMSET 1 /* write char to a given memory area */
#define USE_RUNCTL 1 /* control stop flags of a process */
#define USE_UPDATE 1 /* update a process into another */
-#define USE_MCONTEXT 1 /* enable getting and setting of mach context*/
#define USE_STATECTL 1 /* let a process control its state */
/* Length of program names stored in the process table. This is only used
do_cprofile.c \
do_profbuf.c \
do_vmctl.c \
- do_mcontext.c \
do_schedule.c \
do_schedctl.c \
do_statectl.c
+.include <bsd.own.mk>
+
# Makefile for Process Manager (PM)
PROG= pm
SRCS= main.c forkexit.c break.c exec.c time.c alarm.c \
signal.c utility.c table.c trace.c getset.c misc.c \
- profile.c dma.c mcontext.c schedule.c
+ profile.c dma.c schedule.c
+
+.if ${USE_MCONTEXT} != "no"
+SRCS+= mcontext.c
+CPPFLAGS+= -DUSE_MCONTEXT
+.endif
DPADD+= ${LIBSYS} ${LIBTIMERS}
LDADD+= -lsys -ltimers
/* mcontext.c */
_PROTOTYPE( int do_getmcontext, (void) );
_PROTOTYPE( int do_setmcontext, (void) );
+#if ! USE_MCONTEXT
+#define do_getmcontext no_sys
+#define do_setmcontext no_sys
+#endif
/* misc.c */
_PROTOTYPE( int do_reboot, (void) );
MKYP
#MINIX-specific vars
_MKVARS.yes+= \
- MKWATCHDOG MKACPI MKAPIC
+ MKWATCHDOG MKACPI MKAPIC MKMCONTEXT
.for var in ${_MKVARS.yes}
${var}?= yes
.endfor
MKWATCHDOG:= no
MKACPI:= no
MKAPIC:= no
+MKMCONTEXT:= no
.endif
#
# variable is set to "no".
#
.for var in USE_HESIOD USE_INET6 USE_KERBEROS USE_LDAP USE_PAM USE_YP \
-USE_WATCHDOG USE_ACPI USE_APIC
+USE_WATCHDOG USE_ACPI USE_APIC USE_MCONTEXT
.if (${${var:S/USE_/MK/}} == "no")
${var}:= no
.else