diff --git a/Makefile b/Makefile index 28b78b07af..76e39415eb 100644 --- a/Makefile +++ b/Makefile @@ -63,9 +63,11 @@ OBJDUMP := $(MIPS_BINUTILS_PREFIX)objdump EMULATOR = mupen64plus EMU_FLAGS = --noosd +INC := -Iinclude -Isrc -Iassets -Ibuild -I. + # Check code syntax with host compiler CHECK_WARNINGS := -Wall -Wextra -Wno-format-security -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-variable -Wno-missing-braces -Wno-int-conversion -CC_CHECK := gcc -fno-builtin -fsyntax-only -fsigned-char -std=gnu90 -D _LANGUAGE_C -D NON_MATCHING -Iinclude -Isrc -Iassets -Ibuild -include stdarg.h $(CHECK_WARNINGS) +CC_CHECK := gcc -fno-builtin -fsyntax-only -fsigned-char -std=gnu90 -D _LANGUAGE_C -D NON_MATCHING $(INC) -include stdarg.h $(CHECK_WARNINGS) CPP := cpp MKLDSCRIPT := tools/mkldscript @@ -77,7 +79,7 @@ ASFLAGS := -march=vr4300 -32 -Iinclude MIPS_VERSION := -mips2 # we support Microsoft extensions such as anonymous structs, which the compiler does support but warns for their usage. Surpress the warnings with -woff. -CFLAGS += -G 0 -non_shared -Xfullwarn -Xcpluscomm -Iinclude -Isrc -Iassets -Ibuild -Wab,-r4300_mul -woff 649,838,712 +CFLAGS += -G 0 -non_shared -Xfullwarn -Xcpluscomm $(INC) -Wab,-r4300_mul -woff 649,838,712 ifeq ($(shell getconf LONG_BIT), 32) # Work around memory allocation bug in QEMU @@ -241,10 +243,6 @@ build/src/libultra_code_O1/llcvt.o: src/libultra_code_O1/llcvt.c python3 tools/set_o32abi_bit.py $@ @$(OBJDUMP) -d $@ > $(@:.o=.s) -assets/%.c: assets/%.xml - $(ZAPD) bsf -eh -i $< -o $(dir $<) - $(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o build/$(@:.c=.o) $@ - build/%.inc.c: %.png $(ZAPD) btex -eh -tt $(subst .,,$(suffix $*)) -i $< -o $@