From faa53a106b662bc27fe9f2536f9a143268ac6353 Mon Sep 17 00:00:00 2001 From: orbea Date: Sun, 2 Oct 2016 08:31:19 -0700 Subject: [PATCH] tcc doesn't support -MMD --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a4f0a39073..c6032882d2 100644 --- a/Makefile +++ b/Makefile @@ -31,6 +31,12 @@ ifeq ($(shell $(CC) -v 2>&1 | grep -c "clang"),1) DEFINES += -Wno-invalid-source-encoding endif +ifeq ($(shell $(CC) -v 2>&1 | grep -c "tcc"),1) + MD = -MD +else + MD = -MMD +endif + HEADERS = $(wildcard */*/*.h) $(wildcard */*.h) $(wildcard *.h) ifeq ($(MISSING_DECLS), 1) @@ -133,7 +139,7 @@ retroarch: $(RARCH_OBJ) $(OBJDIR)/%.o: %.c config.h config.mk @mkdir -p $(dir $@) @$(if $(Q), $(shell echo echo CC $<),) - $(Q)$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -MMD -c -o $@ $< + $(Q)$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) $(MD) -c -o $@ $< $(OBJDIR)/%.o: %.cpp config.h config.mk @mkdir -p $(dir $@)