Skip to content

Commit 27cbf13

Browse files
authored
Merge pull request #6350 from dhalbert/samd-SRC_C-conditionals
Compile more SAMD things conditionally
2 parents b71ea29 + 98ae047 commit 27cbf13

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

ports/atmel-samd/Makefile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,13 +319,10 @@ $(patsubst %.c,$(BUILD)/%.o,$(SRC_PERIPHERALS)): CFLAGS += -Wno-missing-prototyp
319319
SRC_C += \
320320
audio_dma.c \
321321
background.c \
322-
bindings/samd/Clock.c \
323-
bindings/samd/__init__.c \
324322
boards/$(BOARD)/board.c \
325323
boards/$(BOARD)/pins.c \
326324
eic_handler.c \
327325
fatfs_port.c \
328-
freetouch/adafruit_ptc.c \
329326
lib/tinyusb/src/portable/microchip/samd/dcd_samd.c \
330327
mphalport.c \
331328
reset.c \
@@ -340,10 +337,18 @@ ifneq (,$(filter 1,$(CIRCUITPY_PWMIO) $(CIRCUITPY_AUDIOIO) $(CIRCUITPY_RGBMATRIX
340337
SRC_C += shared_timers.c
341338
endif
342339

340+
ifeq ($(CIRCUITPY_SAMD),1)
341+
SRC_C += bindings/samd/Clock.c bindings/samd/__init__.c
342+
endif
343+
343344
ifeq ($(CIRCUITPY_SDIOIO),1)
344345
SRC_C += ports/atmel-samd/sd_mmc/sd_mmc.c
345346
endif
346347

348+
ifeq ($(CIRCUITPY_TOUCHIO),1)
349+
SRC_C += freetouch/adafruit_ptc.c
350+
endif
351+
347352
# The smallest SAMD51 packages don't have I2S. Everything else does.
348353
ifeq ($(CIRCUITPY_AUDIOBUSIO),1)
349354
SRC_C += peripherals/samd/i2s.c peripherals/samd/$(PERIPHERALS_CHIP_FAMILY)/i2s.c

0 commit comments

Comments
 (0)