Additional buidl system cleanup. Starting to move all
[zfs.git] / config / kernel
1 # Default ZFS kernel mode configuration 
2
3 # Kernel build make options
4 KERNELMAKE_PARAMS=
5 #KERNELMAKE_PARAMS="V=1"        # Enable verbose module build
6
7 # Kernel build cpp flags
8 KERNELCPPFLAGS="$KERNELCPPFLAGS -DHAVE_SPL -D_KERNEL "
9 KERNELCPPFLAGS="$KERNELCPPFLAGS -I$splsrc -I$splsrc/include -I$TOPDIR"
10
11 # Minimally required for pread() functionality an other GNU goodness
12 HOSTCFLAGS="$HOSTCFLAGS -ggdb -O2 -std=c99 -D_GNU_SOURCE -D__EXTENSIONS__ "
13
14 # XXX: Quiet warnings not covered by the gcc-* patches
15 # XXX: Once all the warnings are resolved these flags should be removed
16 HOSTCFLAGS="$HOSTCFLAGS -Wno-switch -Wno-unused -Wno-missing-braces -Wno-parentheses "
17 HOSTCFLAGS="$HOSTCFLAGS -Wno-uninitialized -fno-strict-aliasing "
18
19 # Expected defines not covered by zfs_config.h or spl_config.h
20 HOSTCFLAGS="$HOSTCFLAGS -DHAVE_SPL -D_POSIX_PTHREAD_SEMANTICS "
21 HOSTCFLAGS="$HOSTCFLAGS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_REENTRANT "
22 HOSTCFLAGS="$HOSTCFLAGS -DTEXT_DOMAIN=\\\"zfs-linux-kernel\\\" "
23
24 # Expected default include paths additional paths added by Makefiles
25 HOSTCFLAGS="$HOSTCFLAGS -I$TOPDIR "
26
27 if test "$kernelbuild" != "$kernelsrc"; then
28         KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$kernelbuild"
29 fi
30
31 # XXX: I really, really hate this...  but to ensure the kernel build 
32 # system compiles C files shared between a library and a kernel module, 
33 # we need to ensure each file has a unique make target.  To do that 
34 # I'm creating symlinks for each shared file at configure time.  It 
35 # may be possible something better can be done in the Makefile but it
36 # will take some serious investigation and I don't have the time now.
37
38 echo "Creating symlinks for additional make targets"
39 ln -f -s $LIBDIR/libport/u8_textprep.c      $LIBDIR/libport/ku8_textprep.c
40 ln -f -s $LIBDIR/libavl/avl.c               $LIBDIR/libavl/kavl.c
41 ln -f -s $LIBDIR/libavl/avl.c               $LIBDIR/libavl/uavl.c
42 ln -f -s $LIBDIR/libnvpair/nvpair.c         $LIBDIR/libnvpair/knvpair.c
43 ln -f -s $LIBDIR/libnvpair/nvpair.c         $LIBDIR/libnvpair/unvpair.c
44 ln -f -s $LIBDIR/libzcommon/zfs_deleg.c     $LIBDIR/libzcommon/kzfs_deleg.c
45 ln -f -s $LIBDIR/libzcommon/zfs_prop.c      $LIBDIR/libzcommon/kzfs_prop.c
46 ln -f -s $LIBDIR/libzcommon/zprop_common.c  $LIBDIR/libzcommon/kzprop_common.c
47 ln -f -s $LIBDIR/libzcommon/compress.c      $LIBDIR/libzcommon/kcompress.c
48 ln -f -s $LIBDIR/libzcommon/list.c          $LIBDIR/libzcommon/klist.c
49 ln -f -s $LIBDIR/libzcommon/zfs_namecheck.c $LIBDIR/libzcommon/kzfs_namecheck.c
50 ln -f -s $LIBDIR/libzcommon/zfs_comutil.c   $LIBDIR/libzcommon/kzfs_comutil.c
51 ln -f -s $LIBDIR/libzcommon/zpool_prop.c    $LIBDIR/libzcommon/kzpool_prop.c