AC_PROG_LIBTOOL
ver=`uname -r`
-KERNELCFLAGS=
-
kernelsrc=
kernelbuild=
AC_ARG_WITH(kernel,
AC_MSG_RESULT([no])
fi
+# Add "V=1" to KERNELMAKE_PARAMS to enable verbose module build
+KERNELMAKE_PARAMS=
+KERNELCPPFLAGS="-I`/bin/pwd`/include"
+
if test "$kernelbuild" != "$kernelsrc"; then
KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$kernelbuild"
fi
-#ifndef _SYS_LINUX_CALLB_H
-#define _SYS_LINUX_CALLB_H
+#ifndef _LINUX_CALLB_H
+#define _LINUX_CALLB_H
#ifdef __cplusplus
extern "C" {
#endif
-#include <sys/linux-mutex.h>
+#include <linux-mutex.h>
#define DEBUG_CALLB
}
#endif
-#endif /* _SYS_LINUX_CALLB_H */
+#endif /* _LINUX_CALLB_H */
-#ifndef _SYS_LINUX_CONDVAR_H
-#define _SYS_LINUX_CONDVAR_H
+#ifndef _LINUX_CONDVAR_H
+#define _LINUX_CONDVAR_H
#ifdef __cplusplus
extern "C" {
if (atomic_read(&cvp->cv_waiters) > 0)
wake_up_all(&cvp->cv_event);
}
-#endif /* _SYS_LINUX_CONDVAR_H */
+#endif /* _LINUX_CONDVAR_H */
-#ifndef _SYS_LINUX_CRED_H
-#define _SYS_LINUX_CRED_H
+#ifndef _LINUX_CRED_H
+#define _LINUX_CRED_H
#ifdef __cplusplus
extern "C" {
}
#endif
-#endif /* _SYS_LINUX_CRED_H */
+#endif /* _LINUX_CRED_H */
-#ifndef _SYS_LINUX_GENERIC_H
-#define _SYS_LINUX_GENERIC_H
+#ifndef _LINUX_GENERIC_H
+#define _LINUX_GENERIC_H
#ifdef __cplusplus
extern "C" {
}
#endif
-#endif /* _SYS_LINUX_GENERIC_H */
+#endif /* _LINUX_GENERIC_H */
-#ifndef _SYS_LINUX_KMEM_H
-#define _SYS_LINUX_KMEM_H
+#ifndef _LINUX_KMEM_H
+#define _LINUX_KMEM_H
#ifdef __cplusplus
extern "C" {
}
#endif
-#endif /* _SYS_LINUX_KMEM_H */
+#endif /* _LINUX_KMEM_H */
-#ifndef _SYS_LINUX_KSTAT_H
-#define _SYS_LINUX_KSTAT_H
+#ifndef _LINUX_KSTAT_H
+#define _LINUX_KSTAT_H
#ifdef __cplusplus
extern "C" {
#endif
-#include <sys/linux-types.h>
+#include <linux-types.h>
/* XXX - The minimum functionality here is stubbed out but nothing works. */
}
#endif
-#endif /* _SYS_LINUX_KSTAT_H */
+#endif /* _LINUX_KSTAT_H */
-#ifndef _SYS_LINUX_MUTEX_H
-#define _SYS_LINUX_MUTEX_H
+#ifndef _LINUX_MUTEX_H
+#define _LINUX_MUTEX_H
#ifdef __cplusplus
extern "C" {
}
#endif
-#endif /* _SYS_LINUX_MUTEX_H */
+#endif /* _LINUX_MUTEX_H */
-#ifndef _SYS_LINUX_RANDOM_H
-#define _SYS_LINUX_RANDOM_H
+#ifndef _LINUX_RANDOM_H
+#define _LINUX_RANDOM_H
#ifdef __cplusplus
extern "C" {
}
#endif
-#endif /* _SYS_LINUX_RANDOM_H */
+#endif /* _LINUX_RANDOM_H */
-#ifndef _SYS_LINUX_RWLOCK_H
-#define _SYS_LINUX_RWLOCK_H
+#ifndef _LINUX_RWLOCK_H
+#define _LINUX_RWLOCK_H
#include <linux/slab.h>
#include <linux/rwsem.h>
#include <asm/current.h>
-#include <sys/linux-types.h>
+#include <linux-types.h>
#ifdef __cplusplus
extern "C" {
}
#endif
-#endif /* _SYS_LINUX_RWLOCK_H */
+#endif /* _LINUX_RWLOCK_H */
-#ifndef _SYS_LINUX_TASKQ_H
-#define _SYS_LINUX_TASKQ_H
+#ifndef _LINUX_TASKQ_H
+#define _LINUX_TASKQ_H
#ifdef __cplusplus
extern "C" {
#include <linux/gfp.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
-#include <sys/linux-types.h>
+#include <linux-types.h>
#undef DEBUG_TASKQ_UNIMPLEMENTED
}
#endif
-#endif /* _SYS_LINUX_TASKQ_H */
+#endif /* _LINUX_TASKQ_H */
-#ifndef _SYS_LINUX_THREAD_H
-#define _SYS_LINUX_THREAD_H
+#ifndef _LINUX_THREAD_H
+#define _LINUX_THREAD_H
#ifdef __cplusplus
extern "C" {
#include <linux/mm.h>
#include <linux/spinlock.h>
-#include <sys/linux-types.h>
-#include <sys/linux-generic.h>
+#include <linux-types.h>
+#include <linux-generic.h>
/*
* Thread interfaces
}
#endif
-#endif /* _SYS_LINUX_THREAD_H */
+#endif /* _LINUX_THREAD_H */
-#ifndef _SYS_TIME_H
-#define _SYS_TIME_H
+#ifndef _TIME_H
+#define _TIME_H
#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.16 */
#endif
#include <linux/time.h>
-#include <sys/linux-types.h>
+#include <linux-types.h>
extern unsigned long long monotonic_clock(void);
typedef struct timespec timestruc_t; /* definition per SVr4 */
}
#endif
-#endif /* _SYS_TIME_H */
+#endif /* _TIME_H */
-#ifndef _SYS_LINUX_TIMER_H
-#define _SYS_LINUX_TIMER_H
+#ifndef _LINUX_TIMER_H
+#define _LINUX_TIMER_H
#ifdef __cplusplus
extern "C" {
}
#endif
-#endif /* _SYS_LINUX_TIMER_H */
+#endif /* _LINUX_TIMER_H */
-#ifndef _SYS_LINUX_TYPES_H
-#define _SYS_LINUX_TYPES_H
+#ifndef _LINUX_TYPES_H
+#define _LINUX_TYPES_H
#ifdef __cplusplus
extern "C" {
#endif
-typedef enum { B_FALSE=0, B_TRUE=1 } boolean_t;
+typedef enum { B_FALSE=0, B_TRUE=1 } boolean_t;
typedef unsigned long uintptr_t;
typedef unsigned long intptr_t;
typedef unsigned long ulong_t;
typedef unsigned long long rlim64_t;
typedef long long longlong_t;
typedef long long offset_t;
-typedef struct task_struct kthread_t;
+typedef struct task_struct kthread_t;
typedef struct vmem { } vmem_t;
typedef short pri_t;
}
#endif
-#endif /* _SYS_LINUX_TYPES_H */
+#endif /* _LINUX_TYPES_H */
-#ifndef _SYS_SPL_H
-#define _SYS_SPL_H
+#ifndef _SPL_H
+#define _SPL_H
-#endif /* _SYS_SPL_H */
+#endif /* _SPL_H */
-#ifndef _SYS_KZT_H
-#define _SYS_KZT_H
+#ifndef _SPLAT_CTL_H
+#define _SPLAY_CTL_H
#ifdef _KERNEL
#include <asm/ioctls.h>
#endif /* _KERNEL */
-#endif /* _SYS_KZT_H */
+#endif /* _SPLAY_CTL_H */
# Makefile.in for spl kernel module
MODULES := spl
-
DISTFILES = Makefile.in \
linux-kmem.c linux-rwlock.c linux-taskq.c linux-thread.c
-
-EXTRA_CFLAGS += -I$(src)
-
-# Removed '-std=gnu99' does to compile issues with i386 SPIN_LOCK_UNLOCKED
-# EXTRA_CFLAGS += -Wall -Wno-unknown-pragmas -Wno-missing-braces \
-# -Wno-sign-compare -Wno-parentheses -Wno-uninitialized \
-# -Wno-implicit-function-declaration -Wno-unused -Wno-trigraphs \
-# -Wno-char-subscripts -Wno-switch
+CPPFLAGS += @KERNELCPPFLAGS@
# Solaris porting layer module
obj-m := spl.o
-#include <sys/linux-thread.h>
+#include <linux-thread.h>
/*
* Thread interfaces
# Makefile.in for splat kernel module
MODULES := splat
-
DISTFILES = Makefile.in \
splat-kmem.c splat-random.c splat-taskq.c \
splat-time.c splat-condvar.c splat-mutex.c \
splat-rwlock.c splat-thread.c splat-ctl.c
-
-# Removed '-std=gnu99' does to compile issues with i386 SPIN_LOCK_UNLOCKED
-# EXTRA_CFLAGS += -I$(src)
-# EXTRA_CFLAGS += -Wall -Wno-unknown-pragmas -Wno-missing-braces \
-# -Wno-sign-compare -Wno-parentheses -Wno-uninitialized \
-# -Wno-implicit-function-declaration -Wno-unused -Wno-trigraphs \
-# -Wno-char-subscripts -Wno-switch
+CPPFLAGS += @KERNELCPPFLAGS@
# Solaris porting layer aggressive tests
obj-m := splat.o