Making libretro compile without warnings with GCC
This commit is contained in:
parent
c64d5b58b6
commit
1e54c55c11
10
Makefile
10
Makefile
@ -89,14 +89,16 @@ OPEN_DIALOG = OpenDialog/cocoa.m
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# These must come before the -Wno- flags
|
# These must come before the -Wno- flags
|
||||||
CFLAGS += -Werror -Wall -Wno-unknown-warning -Wno-unknown-warning-option
|
WARNINGS += -Werror -Wall -Wno-unknown-warning -Wno-unknown-warning-option
|
||||||
CFLAGS += -Wno-nonnull -Wno-unused-result -Wno-strict-aliasing -Wno-multichar -Wno-int-in-bool-context
|
WARNINGS += -Wno-nonnull -Wno-unused-result -Wno-strict-aliasing -Wno-multichar -Wno-int-in-bool-context
|
||||||
|
|
||||||
# Only add this flag if the compiler supports it
|
# Only add this flag if the compiler supports it
|
||||||
ifeq ($(shell $(CC) -x c -c $(NULL) -o $(NULL) -Werror -Wpartial-availability 2> $(NULL); echo $$?),0)
|
ifeq ($(shell $(CC) -x c -c $(NULL) -o $(NULL) -Werror -Wpartial-availability 2> $(NULL); echo $$?),0)
|
||||||
CFLAGS += -Wpartial-availability
|
WARNINGS += -Wpartial-availability
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
CFLAGS += $(WARNINGS)
|
||||||
|
|
||||||
CFLAGS += -std=gnu11 -D_GNU_SOURCE -DVERSION="$(VERSION)" -I. -D_USE_MATH_DEFINES
|
CFLAGS += -std=gnu11 -D_GNU_SOURCE -DVERSION="$(VERSION)" -I. -D_USE_MATH_DEFINES
|
||||||
|
|
||||||
ifeq (,$(PKG_CONFIG))
|
ifeq (,$(PKG_CONFIG))
|
||||||
@ -396,7 +398,7 @@ $(BIN)/BootROMs/%.bin: BootROMs/%.asm $(OBJ)/BootROMs/SameBoyLogo.pb8
|
|||||||
|
|
||||||
# Libretro Core (uses its own build system)
|
# Libretro Core (uses its own build system)
|
||||||
libretro:
|
libretro:
|
||||||
$(MAKE) -C libretro
|
CFLAGS="$(WARNINGS)" $(MAKE) -C libretro
|
||||||
|
|
||||||
# Clean
|
# Clean
|
||||||
clean:
|
clean:
|
||||||
|
Loading…
Reference in New Issue
Block a user