Check INTERNAL_LIBM make flag in a safer way.

This commit is contained in:
Dan Halbert 2017-10-26 22:31:56 -04:00
parent 7f88ba3b26
commit 10b3a90189
2 changed files with 5 additions and 5 deletions

View File

@ -238,10 +238,10 @@ SRC_C = \
# Choose which flash filesystem impl to use. # Choose which flash filesystem impl to use.
# (Right now INTERNAL_FLASH_FILESYSTEM and SPI_FLASH_FILESYSTEM are mutually exclusive. # (Right now INTERNAL_FLASH_FILESYSTEM and SPI_FLASH_FILESYSTEM are mutually exclusive.
# But that might not be true in the future.) # But that might not be true in the future.)
ifdef INTERNAL_FLASH_FILESYSTEM ifeq ($(INTERNAL_FLASH_FILESYSTEM),1)
SRC_C += internal_flash.c SRC_C += internal_flash.c
endif endif
ifdef SPI_FLASH_FILESYSTEM ifeq ($(SPI_FLASH_FILESYSTEM),1)
SRC_C += spi_flash.c SRC_C += spi_flash.c
endif endif
@ -278,7 +278,7 @@ SRC_COMMON_HAL = \
usb_hid/__init__.c \ usb_hid/__init__.c \
usb_hid/Device.c usb_hid/Device.c
ifdef INTERNAL_LIBM ifeq ($(INTERNAL_LIBM),1)
SRC_LIBM = $(addprefix lib/,\ SRC_LIBM = $(addprefix lib/,\
libm/math.c \ libm/math.c \
libm/fmodf.c \ libm/fmodf.c \
@ -338,7 +338,7 @@ OBJ = $(PY_O) $(SUPERVISOR_O) $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
OBJ += $(addprefix $(BUILD)/, $(SRC_ASF:.c=.o)) OBJ += $(addprefix $(BUILD)/, $(SRC_ASF:.c=.o))
OBJ += $(addprefix $(BUILD)/, $(SRC_COMMON_HAL_EXPANDED:.c=.o)) OBJ += $(addprefix $(BUILD)/, $(SRC_COMMON_HAL_EXPANDED:.c=.o))
OBJ += $(addprefix $(BUILD)/, $(SRC_SHARED_MODULE_EXPANDED:.c=.o)) OBJ += $(addprefix $(BUILD)/, $(SRC_SHARED_MODULE_EXPANDED:.c=.o))
ifdef INTERNAL_LIBM ifeq ($(INTERNAL_LIBM),1)
OBJ += $(addprefix $(BUILD)/, $(SRC_LIBM:.c=.o)) OBJ += $(addprefix $(BUILD)/, $(SRC_LIBM:.c=.o))
endif endif

View File

@ -3,5 +3,5 @@
# This should correspond to the MICROPY_LONGINT_IMPL definition in mpconfigport.h. # This should correspond to the MICROPY_LONGINT_IMPL definition in mpconfigport.h.
MPY_TOOL_LONGINT_IMPL = -mlongint-impl=none MPY_TOOL_LONGINT_IMPL = -mlongint-impl=none
INTERNAL_LIBM = (1) INTERNAL_LIBM = 1