blob: b8b393f1bb079497b81fd83a19ccdac06776f55e [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001LOCAL_DIR := $(GET_LOCAL_DIR)
2
3GLOBAL_INCLUDES += $(LOCAL_DIR)/include
4
5MODULE := $(LOCAL_DIR)
6
7MODULE_SRCS += \
8 $(LOCAL_DIR)/heap_wrapper.c \
9 $(LOCAL_DIR)/page_alloc.c
10
11ifeq ($(WITH_CPP_SUPPORT),true)
12MODULE_SRCS += \
13 $(LOCAL_DIR)/new.cpp
14endif
15
16# pick a heap implementation
17ifndef LK_HEAP_IMPLEMENTATION
18LK_HEAP_IMPLEMENTATION=miniheap
19endif
20ifeq ($(LK_HEAP_IMPLEMENTATION),miniheap)
21MODULE_DEPS := lib/heap/miniheap
22endif
23ifeq ($(LK_HEAP_IMPLEMENTATION),dlmalloc)
24MODULE_DEPS := lib/heap/dlmalloc
25endif
26ifeq ($(LK_HEAP_IMPLEMENTATION),cmpctmalloc)
27MODULE_DEPS := lib/heap/cmpctmalloc
28endif
29
30GLOBAL_DEFINES += LK_HEAP_IMPLEMENTATION=$(LK_HEAP_IMPLEMENTATION)
31
32include make/module.mk