Makefile: Add phony target "clang-tools" for use with clang-tools.

ex: clang-query `make clang-tools`

DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@6108 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2017-03-23 20:47:11 +00:00
parent 886924126a
commit cf3a4550b0
2 changed files with 6 additions and 2 deletions

View file

@ -66,7 +66,7 @@ CLANG?=0
CLANG_POTENTIAL_VERSION := $(shell $(CCFULLPATH) --version) CLANG_POTENTIAL_VERSION := $(shell $(CCFULLPATH) --version)
ifeq ($(findstring clang,$(CC)),clang) ifeq ($(findstring clang,$(CC) $(MAKECMDGOALS)),clang)
override CLANG=1 override CLANG=1
CLANGNAME:=$(CC) CLANGNAME:=$(CC)
else else
@ -877,7 +877,7 @@ ifeq ($(RENDERTYPE),SDL)
SDLCONFIG_CFLAGS := $(strip $(subst -Dmain=SDL_main,,$(shell $(SDLCONFIG) --cflags))) SDLCONFIG_CFLAGS := $(strip $(subst -Dmain=SDL_main,,$(shell $(SDLCONFIG) --cflags)))
SDLCONFIG_LIBS := $(strip $(subst -mwindows,,$(shell $(SDLCONFIG) --libs))) SDLCONFIG_LIBS := $(strip $(subst -mwindows,,$(shell $(SDLCONFIG) --libs)))
COMMONFLAGS += $(SDLCONFIG_CFLAGS) COMPILERFLAGS += $(SDLCONFIG_CFLAGS)
LIBS += $(SDLCONFIG_LIBS) LIBS += $(SDLCONFIG_LIBS)
else else
ifeq ($(SDL_TARGET),1) ifeq ($(SDL_TARGET),1)

View file

@ -786,6 +786,7 @@ endif
printtools \ printtools \
rev \ rev \
$(ENGINE_OBJ)/rev.$o \ $(ENGINE_OBJ)/rev.$o \
clang-tools \
.SUFFIXES: .SUFFIXES:
.SECONDEXPANSION: .SECONDEXPANSION:
@ -959,6 +960,9 @@ $(foreach i,$(COMPONENTS),$($i_OBJ)): | $(obj)
## PHONIES ## PHONIES
clang-tools: $(filter %.c %.cpp %.m %.mm,$(DUKE3D_GAME_SRCS_TARGET) $(DUKE3D_EDITOR_SRCS_TARGET) $(COMMON_EDITOR_SRCS_TARGET) $(ENGINE_SRCS))
echo $^ -- $(COMPILERFLAGS) $(foreach i,$(COMPONENTS),$($i_CFLAGS)) $(CWARNS)
$(foreach i,$(GAMES),clean$($i)): $(foreach i,$(GAMES),clean$($i)):
-rm -f $(foreach i,$(ROLES),$($($(subst clean,,$@))_$i)$(EXESUFFIX)) -rm -f $(foreach i,$(ROLES),$($($(subst clean,,$@))_$i)$(EXESUFFIX))
ifeq ($(PLATFORM),DARWIN) ifeq ($(PLATFORM),DARWIN)