summaryrefslogtreecommitdiff
path: root/nuttx/mm/Makefile
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-09-22 10:33:23 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-09-22 10:33:23 -0600
commit2f5f0694b85c610b4f93cdaccb37623d9f5607a6 (patch)
tree6c0dc7d971a01ca55a5b91f8f61acf0ae4b8bf4a /nuttx/mm/Makefile
parent2346e07b16084d1b0c3238b223c07134b043d2e0 (diff)
downloadpx4-nuttx-2f5f0694b85c610b4f93cdaccb37623d9f5607a6.tar.gz
px4-nuttx-2f5f0694b85c610b4f93cdaccb37623d9f5607a6.tar.bz2
px4-nuttx-2f5f0694b85c610b4f93cdaccb37623d9f5607a6.zip
Move granuale allocator and page allocator from mm/. to mm/mm_gran/.
Diffstat (limited to 'nuttx/mm/Makefile')
-rw-r--r--nuttx/mm/Makefile28
1 files changed, 13 insertions, 15 deletions
diff --git a/nuttx/mm/Makefile b/nuttx/mm/Makefile
index 03331ebd9..2aa90e5e4 100644
--- a/nuttx/mm/Makefile
+++ b/nuttx/mm/Makefile
@@ -48,10 +48,17 @@ else
endif
endif
-# Core allocator logic
+# Sources and paths
ASRCS =
-CSRCS = mm_initialize.c mm_sem.c mm_addfreechunk.c mm_size2ndx.c
+CSRCS =
+
+DEPPATH = --dep-path .
+VPATH = .
+
+# Core allocator logic
+
+CSRCS += mm_initialize.c mm_sem.c mm_addfreechunk.c mm_size2ndx.c
CSRCS += mm_shrinkchunk.c
CSRCS += mm_brkaddr.c mm_calloc.c mm_extend.c mm_free.c mm_mallinfo.c
CSRCS += mm_malloc.c mm_memalign.c mm_realloc.c mm_zalloc.c
@@ -88,16 +95,7 @@ endif
# An optional granule allocator
-ifeq ($(CONFIG_GRAN),y)
-CSRCS += mm_graninit.c mm_granreserve.c mm_granalloc.c mm_granmark.c
-CSRCS += mm_granfree.c mm_grancritical.c
-
-# A page allocator based on the granule allocator
-
-ifeq ($(CONFIG_MM_PGALLOC),y)
-CSRCS += mm_pgalloc.c
-endif
-endif
+include mm_gran/Make.defs
BINDIR ?= bin
@@ -145,10 +143,10 @@ endif
.depend: Makefile $(SRCS)
ifeq ($(CONFIG_BUILD_PROTECTED),y)
- $(Q) $(MKDEP) --obj-path ubin --obj-suffix $(OBJEXT) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make_ubin.dep
- $(Q) $(MKDEP) --obj-path kbin --obj-suffix $(OBJEXT) "$(CC)" -- $(CFLAGS) $(KDEFINE) -- $(SRCS) >Make_kbin.dep
+ $(Q) $(MKDEP) --obj-path ubin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make_ubin.dep
+ $(Q) $(MKDEP) --obj-path kbin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) $(KDEFINE) -- $(SRCS) >Make_kbin.dep
else
- $(Q) $(MKDEP) --obj-path bin --obj-suffix $(OBJEXT) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make_bin.dep
+ $(Q) $(MKDEP) --obj-path bin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make_bin.dep
endif
$(Q) touch $@