Skip to content

Commit 2b80add

Browse files
committed
Check INTERNAL_LIBM make flag in a safer way.
1 parent e7e8e0a commit 2b80add

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

ports/atmel-samd/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,10 +238,10 @@ SRC_C = \
238238
# Choose which flash filesystem impl to use.
239239
# (Right now INTERNAL_FLASH_FILESYSTEM and SPI_FLASH_FILESYSTEM are mutually exclusive.
240240
# But that might not be true in the future.)
241-
ifdef INTERNAL_FLASH_FILESYSTEM
241+
ifeq ($(INTERNAL_FLASH_FILESYSTEM),1)
242242
SRC_C += internal_flash.c
243243
endif
244-
ifdef SPI_FLASH_FILESYSTEM
244+
ifeq ($(SPI_FLASH_FILESYSTEM),1)
245245
SRC_C += spi_flash.c
246246
endif
247247

@@ -278,7 +278,7 @@ SRC_COMMON_HAL = \
278278
usb_hid/__init__.c \
279279
usb_hid/Device.c
280280

281-
ifdef INTERNAL_LIBM
281+
ifeq ($(INTERNAL_LIBM),1)
282282
SRC_LIBM = $(addprefix lib/,\
283283
libm/math.c \
284284
libm/fmodf.c \
@@ -338,7 +338,7 @@ OBJ = $(PY_O) $(SUPERVISOR_O) $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
338338
OBJ += $(addprefix $(BUILD)/, $(SRC_ASF:.c=.o))
339339
OBJ += $(addprefix $(BUILD)/, $(SRC_COMMON_HAL_EXPANDED:.c=.o))
340340
OBJ += $(addprefix $(BUILD)/, $(SRC_SHARED_MODULE_EXPANDED:.c=.o))
341-
ifdef INTERNAL_LIBM
341+
ifeq ($(INTERNAL_LIBM),1)
342342
OBJ += $(addprefix $(BUILD)/, $(SRC_LIBM:.c=.o))
343343
endif
344344

ports/atmel-samd/mpconfigport.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
# This should correspond to the MICROPY_LONGINT_IMPL definition in mpconfigport.h.
44
MPY_TOOL_LONGINT_IMPL = -mlongint-impl=none
55

6-
INTERNAL_LIBM = (1)
6+
INTERNAL_LIBM = 1
77

0 commit comments

Comments
 (0)