SRCS= mpx.S
SRCS+= start.c table.c main.c proc.c \
system.c clock.c utility.c debug.c interrupt.c \
- watchdog.c cpulocals.c
+ cpulocals.c
.ifdef CONFIG_SMP
SRCS += smp.c
.include "system/Makefile.inc"
.include "arch/${ARCH}/Makefile.inc"
+.if ${USE_WATCHDOG} != "no"
+SRCS+= watchdog.c arch_watchdog.c
+CPPFLAGS+= -DUSE_WATCHDOG
+.endif
+
# These come last, so the profiling buffer is at the end of the data segment
SRCS+= profile.c do_sprofile.c
arch_system.c \
apic.c \
apic_asm.S \
- arch_watchdog.c \
pre_init.c \
acpi.c
#include "acpi.h"
-#ifdef CONFIG_WATCHDOG
+#ifdef USE_WATCHDOG
#include "kernel/watchdog.h"
#endif
#ifdef CONFIG_APIC
#include "apic.h"
-#ifdef CONFIG_WATCHDOG
+#ifdef USE_WATCHDOG
#include "kernel/watchdog.h"
#endif
#endif
#endif
#endif
-#ifdef CONFIG_WATCHDOG
+#ifdef USE_WATCHDOG
/*
* We make sure that we don't enable the watchdog until paging is turned
* on as we might get an NMI while switching and we might still use wrong
EXCEPTION_NO_ERR_CODE(DEBUG_VECTOR)
LABEL(nmi)
-#ifndef CONFIG_WATCHDOG
+#ifndef USE_WATCHDOG
EXCEPTION_NO_ERR_CODE(NMI_VECTOR)
#else
/*
#include "clock.h"
-#ifdef CONFIG_WATCHDOG
+#ifdef USE_WATCHDOG
#include "watchdog.h"
#endif
struct proc * p, * billp;
/* FIXME watchdog for slave cpus! */
-#ifdef CONFIG_WATCHDOG
+#ifdef USE_WATCHDOG
/*
* we need to know whether local timer ticks are happening or whether
* the kernel is locked up. We don't care about overflows as we only
#endif
/* boot verbose */
#define CONFIG_BOOT_VERBOSE
-/*
- * compile in the nmi watchdog by default. It is not enabled until watchdog=1
- * (non-zero) is set in monitor
- */
-#define CONFIG_WATCHDOG
#ifndef CONFIG_MAX_CPUS
#define CONFIG_MAX_CPUS 1
#ifdef CONFIG_SMP
#include "smp.h"
#endif
-#ifdef CONFIG_WATCHDOG
+#ifdef USE_WATCHDOG
#include "watchdog.h"
#endif
#include "spinlock.h"
#include <string.h>
#include "proto.h"
-#ifdef CONFIG_WATCHDOG
+#ifdef USE_WATCHDOG
#include "watchdog.h"
#endif
config_apic_timer_x = 1;
#endif
-#ifdef CONFIG_WATCHDOG
+#ifdef USE_WATCHDOG
value = env_get("watchdog");
if (value)
watchdog_enabled = atoi(value);
MKSHARE MKSKEY MKSTATICLIB \
MKX11FONTS \
MKYP
+#MINIX-specific vars
+_MKVARS.yes+= \
+ MKWATCHDOG
.for var in ${_MKVARS.yes}
${var}?= yes
.endfor
MKNLS:= no
.endif
+# MINIX
+.if ${MKEMBED} == "yes"
+MKWATCHDOG:= no
+.endif
+
#
# install(1) parameters.
#
# USE_* options which default to "yes" unless their corresponding MK*
# variable is set to "no".
#
-.for var in USE_HESIOD USE_INET6 USE_KERBEROS USE_LDAP USE_PAM USE_YP
+.for var in USE_HESIOD USE_INET6 USE_KERBEROS USE_LDAP USE_PAM USE_YP \
+USE_WATCHDOG
.if (${${var:S/USE_/MK/}} == "no")
${var}:= no
.else
.elif !empty(CC:M*gcc) || !empty(CC:M*clang) || !empty(CC:M*pcc)
COMPILER_TYPE=gnu
AR?= ar
-
-.if defined(MKEMBED) && ${MKEMBED} == "yes"
-DBG= -Os
-CFLAGS+= -DNDEBUG=1
-.endif
-
.endif
# Set NBSD_LIBC to either "yes" or "no".
.else
NBSD_LIBC= yes
.endif
+
+.if ${COMPILER_TYPE} == "gnu" && defined(MKEMBED) && ${MKEMBED} == "yes"
+DBG= -Os
+CFLAGS+= -DNDEBUG=1
+.endif