mirror of
https://github.com/libretro/tyrquake.git
synced 2026-11-07 04:35:58 -10:00
Makefile.common: use MSVC force-include syntax for the libvorbis rename
The float libvorbis TUs force-include fvorbis_rename.h to namespace their symbols to fv_*. The per-object CFLAGS used the GCC/clang "-include <file>" form together with -Wno-maybe-uninitialized, both of which MSVC's cl.exe rejects: -Wno-maybe-uninitialized trips command-line error D8021, and -include is not understood (cl spells force-include "-FI<file>"). Select the force-include spelling by toolchain and drop the GCC-only warning suppression on MSVC, where that diagnostic does not exist. The GCC/clang command line is byte-for-byte unchanged.
This commit is contained in:
1 parent
eac92862b5
commit
ff36964795
1 file changed
+14
-2
+14
-2
@@ -240,8 +240,20 @@ LIBVORBIS_SOURCES = \
|
||||
|
||||
SOURCES_C += $(LIBVORBIS_SOURCES) $(CORE_DIR)/common/snd_vorbis_float.c
|
||||
|
||||
# Force-include syntax and the uninitialized-warning suppression differ by
|
||||
# toolchain. MSVC's cl.exe spells force-include "-FI<file>" and rejects both
|
||||
# the GCC/clang "-include <file>" form and "-Wno-*" outright (command-line
|
||||
# error D8021); the GCC warning it suppresses does not exist there anyway.
|
||||
ifneq (,$(findstring msvc,$(platform)))
|
||||
LIBVORBIS_FORCE_INCLUDE := -FI$(LIBVORBIS_DIR)/lib/fvorbis_rename.h
|
||||
LIBVORBIS_EXTRA_CFLAGS :=
|
||||
else
|
||||
LIBVORBIS_FORCE_INCLUDE := -include $(LIBVORBIS_DIR)/lib/fvorbis_rename.h
|
||||
LIBVORBIS_EXTRA_CFLAGS := -Wno-maybe-uninitialized
|
||||
endif
|
||||
|
||||
$(LIBVORBIS_SOURCES:.c=.o): CFLAGS += \
|
||||
-include $(LIBVORBIS_DIR)/lib/fvorbis_rename.h \
|
||||
$(LIBVORBIS_FORCE_INCLUDE) \
|
||||
-I$(LIBVORBIS_DIR)/lib -I$(LIBVORBIS_DIR)/include \
|
||||
-Wno-maybe-uninitialized
|
||||
$(LIBVORBIS_EXTRA_CFLAGS)
|
||||
endif
|
||||
Reference in new issue
Block a user