1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

make: use -std=c99 as default

This commit is contained in:
Kaspar Schleiser 2016-09-05 21:51:48 +02:00
parent 8432d923be
commit 5447a434e7

View File

@ -1,13 +1,8 @@
# Test if the input language was specified externally.
# Otherwise test if the compiler unterstands the "-std=gnu99" flag, and use it if so.
# Otherwise test if the compiler unterstands the "-std=c99" flag, and use it if so.
ifeq ($(filter -std=%,$(CFLAGS)),)
ifeq ($(shell $(CC) -std=gnu99 -E - 2>/dev/null >/dev/null </dev/null ; echo $$?),0)
CFLAGS += -std=gnu99
else
ifeq ($(shell $(CC) -std=c99 -E - 2>/dev/null >/dev/null </dev/null ; echo $$?),0)
CFLAGS += -std=c99
endif
ifeq ($(shell $(CC) -std=c99 -E - 2>/dev/null >/dev/null </dev/null ; echo $$?),0)
CFLAGS += -std=c99
endif
endif