File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 74
74
75
75
ifeq ($(MICROPY_PY_BTREE ) ,1)
76
76
BTREE_DIR = lib/berkeley-db-1.xx
77
- CFLAGS_MOD + = -D__DBINTERFACE_PRIVATE=1 -Dmpool_error=printf -Dabort=abort_ -Dvirt_fd_t=mp_obj_t "-DVIRT_FD_T_HEADER=<py/obj.h>"
77
+ BTREE_DEFS = -D__DBINTERFACE_PRIVATE=1 -Dmpool_error=printf -Dabort=abort_ -Dvirt_fd_t=mp_obj_t "-DVIRT_FD_T_HEADER=<py/obj.h>"
78
78
INC += -I../$(BTREE_DIR ) /PORT/include
79
79
SRC_MOD += extmod/modbtree.c
80
80
SRC_MOD += $(addprefix $(BTREE_DIR ) /,\
@@ -95,7 +95,9 @@ mpool/mpool.c \
95
95
)
96
96
CFLAGS_MOD += -DMICROPY_PY_BTREE=1
97
97
# we need to suppress certain warnings to get berkeley-db to compile cleanly
98
- $(BUILD ) /$(BTREE_DIR ) /% .o : CFLAGS += -Wno-old-style-definition -Wno-sign-compare -Wno-unused-parameter
98
+ # and we have separate BTREE_DEFS so the definitions don't interfere with other source code
99
+ $(BUILD ) /$(BTREE_DIR ) /% .o : CFLAGS += -Wno-old-style-definition -Wno-sign-compare -Wno-unused-parameter $(BTREE_DEFS )
100
+ $(BUILD ) /extmod/modbtree.o : CFLAGS += $(BTREE_DEFS )
99
101
endif
100
102
101
103
# py object files
You can’t perform that action at this time.
0 commit comments