mm: Support compiling out madvise and fadvise
[sfrench/cifs-2.6.git] / mm / Makefile
index 632ae77e6070ebfad40b644a1321d6af17507541..fe7a053c0f45f66a1398d740419ba9ffe9c1ca3a 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 mmu-y                  := nommu.o
 #
 
 mmu-y                  := nommu.o
-mmu-$(CONFIG_MMU)      := fremap.o gup.o highmem.o madvise.o memory.o mincore.o \
+mmu-$(CONFIG_MMU)      := fremap.o gup.o highmem.o memory.o mincore.o \
                           mlock.o mmap.o mprotect.o mremap.o msync.o rmap.o \
                           vmalloc.o pagewalk.o pgtable-generic.o
 
                           mlock.o mmap.o mprotect.o mremap.o msync.o rmap.o \
                           vmalloc.o pagewalk.o pgtable-generic.o
 
@@ -11,7 +11,7 @@ ifdef CONFIG_CROSS_MEMORY_ATTACH
 mmu-$(CONFIG_MMU)      += process_vm_access.o
 endif
 
 mmu-$(CONFIG_MMU)      += process_vm_access.o
 endif
 
-obj-y                  := filemap.o mempool.o oom_kill.o fadvise.o \
+obj-y                  := filemap.o mempool.o oom_kill.o \
                           maccess.o page_alloc.o page-writeback.o \
                           readahead.o swap.o truncate.o vmscan.o shmem.o \
                           util.o mmzone.o vmstat.o backing-dev.o \
                           maccess.o page_alloc.o page-writeback.o \
                           readahead.o swap.o truncate.o vmscan.o shmem.o \
                           util.o mmzone.o vmstat.o backing-dev.o \
@@ -28,6 +28,9 @@ else
        obj-y           += bootmem.o
 endif
 
        obj-y           += bootmem.o
 endif
 
+ifdef CONFIG_MMU
+       obj-$(CONFIG_ADVISE_SYSCALLS)   += fadvise.o madvise.o
+endif
 obj-$(CONFIG_HAVE_MEMBLOCK) += memblock.o
 
 obj-$(CONFIG_SWAP)     += page_io.o swap_state.o swapfile.o
 obj-$(CONFIG_HAVE_MEMBLOCK) += memblock.o
 
 obj-$(CONFIG_SWAP)     += page_io.o swap_state.o swapfile.o