158
158
endif
159
159
endif
160
160
161
- CFLAGS += $(INC ) -Wall -Werror -std=gnu11 -nostdlib -fshort-enums $(BASE_CFLAGS ) $(CFLAGS_MOD ) $(COPT )
161
+ CFLAGS += $(INC ) -Wall -Werror -std=gnu11 -nostdlib -fshort-enums $(BASE_CFLAGS ) $(CFLAGS_MOD ) $(COPT ) -Werror=missing-prototypes
162
162
163
163
ifeq ($(CHIP_FAMILY ) , samd21)
164
164
CFLAGS += \
@@ -291,19 +291,9 @@ $(BUILD)/asf4/$(CHIP_FAMILY)/hpl/sdhc/hpl_sdhc.o: CFLAGS += -Wno-cast-align -Wno
291
291
endif
292
292
293
293
SRC_ASF := $(addprefix asf4/$(CHIP_FAMILY ) /, $(SRC_ASF ) )
294
+ $(patsubst $(SRC_ASF ) ,% .c,% .o) : CFLAGS += -Wno-missing-prototypes
294
295
295
- SRC_C += \
296
- audio_dma.c \
297
- background.c \
298
- bindings/samd/Clock.c \
299
- bindings/samd/__init__.c \
300
- boards/$(BOARD ) /board.c \
301
- boards/$(BOARD ) /pins.c \
302
- eic_handler.c \
303
- fatfs_port.c \
304
- freetouch/adafruit_ptc.c \
305
- lib/tinyusb/src/portable/microchip/samd/dcd_samd.c \
306
- mphalport.c \
296
+ SRC_PERIPHERALS := \
307
297
peripherals/samd/$(PERIPHERALS_CHIP_FAMILY ) /adc.c \
308
298
peripherals/samd/$(PERIPHERALS_CHIP_FAMILY ) /cache.c \
309
299
peripherals/samd/$(PERIPHERALS_CHIP_FAMILY ) /clocks.c \
@@ -319,8 +309,24 @@ SRC_C += \
319
309
peripherals/samd/external_interrupts.c \
320
310
peripherals/samd/sercom.c \
321
311
peripherals/samd/timers.c \
312
+
313
+ $(patsubst $(SRC_PERIPHERALS ) ,% .c,% .o) : CFLAGS += -Wno-missing-prototypes
314
+
315
+ SRC_C += \
316
+ audio_dma.c \
317
+ background.c \
318
+ bindings/samd/Clock.c \
319
+ bindings/samd/__init__.c \
320
+ boards/$(BOARD ) /board.c \
321
+ boards/$(BOARD ) /pins.c \
322
+ eic_handler.c \
323
+ fatfs_port.c \
324
+ freetouch/adafruit_ptc.c \
325
+ lib/tinyusb/src/portable/microchip/samd/dcd_samd.c \
326
+ mphalport.c \
322
327
reset.c \
323
328
timer_handler.c \
329
+ $(SRC_PERIPHERALS ) \
324
330
325
331
# This is an OR because it filters to any 1s and then checks to see if it is not
326
332
# empty.
0 commit comments