circuitpython/examples/natmod/btree/Makefile
Jeff Epler aca9d5bc40 Fix up all natmod examples
* modframebuf: _mp_framebuf_p_t is not "really" a protocol, but the
   QSTR assignment caused problems when building as a dynamic module
 * modure: str_index_to_ptr is not in the natmod API, disable URE match
   spans when dynamic.  mp_obj_len() is a bugfix, we should throw here
   if the object is not string-like
 * moduzlib: Correct paths to uzlib headers & sources.  this relative
   path (from moduzlib.c to the referenced file) works in all cases,
   the other only worked from ports/PORTNAME.
 * dynruntime: Handle 2-arg m_malloc, assert_native_inited, add a
   micropythonish mp_arg_check_num_mp, fix mp_raise_msg to use dumb
   strings, add mp_raise_arg1
 * nativeglue: ad assert_native_inited
 * translate: MP_ERROR_TEXT evaluates to its argument for DYNRUNTIME
 * mpy-tool: A straggling magic number change
 * mpy_ld: Have to renumber manually after dynruntime change
 * import_mpy_native_gc.py: Update copy of features0 baked into this test
2021-05-08 20:17:16 -05:00

38 lines
966 B
Makefile

# Location of top-level MicroPython directory
MPY_DIR = ../../..
# Name of module (different to built-in btree so it can coexist)
MOD = btree_$(ARCH)
# Source files (.c or .py)
SRC = btree_c.c btree_py.py
# Architecture to build for (x86, x64, armv7m, xtensa, xtensawin)
ARCH = x64
BTREE_DIR = $(MPY_DIR)/lib/berkeley-db-1.xx
BTREE_DEFS = -D__DBINTERFACE_PRIVATE=1 -Dmpool_error="(void)" -Dabort=abort_ "-Dvirt_fd_t=void*" $(BTREE_DEFS_EXTRA)
CFLAGS += -I$(BTREE_DIR)/PORT/include
CFLAGS += -Wno-old-style-definition -Wno-sign-compare -Wno-unused-parameter $(BTREE_DEFS)
SRC += $(addprefix $(realpath $(BTREE_DIR))/,\
btree/bt_close.c \
btree/bt_conv.c \
btree/bt_delete.c \
btree/bt_get.c \
btree/bt_open.c \
btree/bt_overflow.c \
btree/bt_page.c \
btree/bt_put.c \
btree/bt_search.c \
btree/bt_seq.c \
btree/bt_split.c \
btree/bt_utils.c \
mpool/mpool.c \
)
include $(MPY_DIR)/py/dynruntime.mk
# btree needs gnu99 defined
CFLAGS += -std=gnu99