~ubuntu-branches/ubuntu/raring/aufs/raring

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/usr/bin/make -f
# Configuration for aufs in Debian
define exported
ifneq (,$(shell grep '^.*[[:space:]]$(1)[[:space:]]vmlinux[[:space:]]EXPORT_SYMBOL' $(srctree)/Module.symvers))
export $(2)=y
export EXTRA_CFLAGS += -D$(2)
endif
endef

# Configuration for aufs in Debian
export CONFIG_AUFS                = m
export CONFIG_AUFS_LOCAL = y
export CONFIG_AUFS_BRANCH_MAX_127 = y
export CONFIG_AUFS_RR_SQUASHFS    = y
export EXTRA_CFLAGS               = -I $(M)/include \
                                    -DCONFIG_AUFS_BRANCH_MAX_127  -UCONFIG_AUFS \
                                    -DCONFIG_AUFS_MODULE \
                                    -DCONFIG_AUFS_LOCAL \
                                    -DCONFIG_AUFS_RR_SQUASHFS

# Disable sysaufs on ARM, as there is no cmpxchg
ifneq ($(shell dpkg-architecture -qDEB_BUILD_ARCH),arm)
ifneq ($(shell dpkg-architecture -qDEB_BUILD_ARCH),armel)
export CONFIG_AUFS_SYSAUFS  = y
export EXTRA_CFLAGS        += -DCONFIG_AUFS_SYSAUFS
endif
endif

ifdef SUBLEVEL
ifeq "y" "$(shell test $(SUBLEVEL) -ge 23 && echo y)"
  export EXTRA_CFLAGS += -DCONFIG_AUFS_SPLICE_PATCH
endif
endif

ifneq (,$(srctree))
ifeq "y" "$(shell test $(SUBLEVEL) -lt 22 && echo y)"
$(eval $(call exported,ksize,CONFIG_AUFS_KSIZE_PATCH)) #ksize
endif
$(eval $(call exported,__lookup_hash,CONFIG_AUFS_LHASH_PATCH)) #lhash
$(eval $(call exported,put_filp,CONFIG_AUFS_PUT_FILP_PATCH)) #put_filp
$(eval $(call exported,do_splice_from,CONFIG_AUFS_SPLICE_PATCH2)) # splice_patches
$(eval $(call exported,security_inode_permission,CONFIG_AUFS_SEC_PERM_PATCH)) # SEC_PERM
endif

# If lhash and put_filp are not available, activate FAKE_DM.
ifndef CONFIG_AUFS_PUT_FILP_PATCH
ifndef CONFIG_AUFS_LHASH_PATCH
export CONFIG_AUFS_FAKE_DM  = y
export EXTRA_CFLAGS        += -DCONFIG_AUFS_FAKE_DM
endif
endif

ifdef CONFIG_AUFS_LHASH_PATCH
  export CONFIG_AUFS_BR_NFS = y
  export EXTRA_CFLAGS        += -DCONFIG_AUFS_BR_NFS
endif