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