1
1
# AUFS Makefile for the Linux 2.6.16 and later
2
# $Id: Makefile,v 1.39 2007/12/17 03:30:17 sfjro Exp $
2
# $Id: Makefile,v 1.41 2008/03/31 07:40:26 sfjro Exp $
4
4
# the environment variables are not inherited since 2.6.23
5
5
ifdef AUFS_EXTRA_CFLAGS
19
19
ifdef CONFIG_AUFS_WORKAROUND_FUSE
20
20
# it isn't defined in a header file
21
fuse = $(shell grep '\#.*define.*FUSE_SUPER_MAGIC' ${srctree}/fs/fuse/inode.c | \
21
fuse_f = ${srctree}/fs/fuse/inode.c
22
ifeq ($(strip $(shell test -e ${fuse_f} && echo t)),t)
23
fuse = $(shell grep '\#.*define.*FUSE_SUPER_MAGIC' ${fuse_f} | \
24
26
EXTRA_CFLAGS += -DFUSE_SUPER_MAGIC=${fuse}
28
$(warning Ignoring FUSE_SUPER_MAGIC)
33
# it isn't defined in a header file
27
34
ifeq ($(strip $(shell test ${SUBLEVEL} -ge 24 && echo t)),t)
29
# it isn't defined in a header file
30
xfs = $(shell grep '\#.*define.*XFS_SB_MAGIC' ${srctree}/fs/xfs/xfs_sb.h | \
35
xfs_f=${srctree}/fs/xfs/xfs_sb.h
36
ifeq ($(strip $(shell test -e ${xfs_f} && echo t)),t)
37
xfs = $(shell grep '\#.*define.*XFS_SB_MAGIC' ${xfs_f} | \
33
40
EXTRA_CFLAGS += -DXFS_SB_MAGIC=${xfs}
42
$(warning Ignoring XFS_SB_MAGIC)
38
48
# it isn't defined in a header file
39
tmpfs = $(shell grep '\#.*define.*TMPFS_MAGIC' ${srctree}/mm/shmem.c | \
49
tmpfs_f=${srctree}/mm/shmem.c
50
ifeq ($(strip $(shell test -e ${tmpfs_f} && echo t)),t)
51
tmpfs = $(shell grep '\#.*define.*TMPFS_MAGIC' ${tmpfs_f} | \
42
54
EXTRA_CFLAGS += -DTMPFS_MAGIC=${tmpfs}
56
$(warning Ignoring TMPFS_MAGIC)
60
#$(warning ${EXTRA_CFLAGS})
45
62
########################################
59
76
aufs-$(CONFIG_AUFS_EXPORT) += export.o
60
77
#aufs-$(CONFIG_DEBUGFS) += dbgfs.o
61
78
aufs-$(CONFIG_AUFS_DEBUG) += debug.o
81
ifdef CONFIG_AUFS_DEBUG
82
ifeq "yes" "$(shell test ${SUBLEVEL} -ge 18 && echo yes)"
83
aufs-$(CONFIG_MAGIC_SYSRQ) += sysrq.o