diff --git a/Makefile b/Makefile index c624b56..40833be 100644 --- a/Makefile +++ b/Makefile @@ -53,13 +53,17 @@ TODAY = $(shell date "+%Y-%m-%d") ARCHFLAGS ?= -maes -mavx2 -mbmi2 #TODO ifeq ($(CC),clang) -WARNFLAGS += -Wgcc-compat +WARNFLAGS_C += -Wgcc-compat +endif + +ifeq ($(CXX),clang++) +WARNFLAGS_CXX += -Wgcc-compat endif ARCHFLAGS += $(XARCHFLAGS) -CFLAGS = $(LANGFLAGS) $(WARNFLAGS) $(INCFLAGS) $(OFLAGS) $(ARCHFLAGS) $(GENFLAGS) $(XCFLAGS) -PUB_CFLAGS = $(LANGFLAGS) $(WARNFLAGS) $(PUB_INCFLAGS) $(OFLAGS) $(ARCHFLAGS) $(GENFLAGS) $(XCFLAGS) -CXXFLAGS = $(LANGXXFLAGS) $(WARNFLAGS) $(INCFLAGS) $(OFLAGS) $(ARCHFLAGS) $(GENFLAGS) $(XCXXFLAGS) +CFLAGS = $(LANGFLAGS) $(WARNFLAGS) $(WARNFLAGS_C) $(INCFLAGS) $(OFLAGS) $(ARCHFLAGS) $(GENFLAGS) $(XCFLAGS) +PUB_CFLAGS = $(LANGFLAGS) $(WARNFLAGS) $(WARNFLAGS_C) $(PUB_INCFLAGS) $(OFLAGS) $(ARCHFLAGS) $(GENFLAGS) $(XCFLAGS) +CXXFLAGS = $(LANGXXFLAGS) $(WARNFLAGS) $(WARNFLAGS_CXX) $(INCFLAGS) $(OFLAGS) $(ARCHFLAGS) $(GENFLAGS) $(XCXXFLAGS) LDFLAGS = $(XLDFLAGS) ASFLAGS = $(ARCHFLAGS) $(XASFLAGS)