mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
Makefile: do '(very)clean' with a plain "rm -f some/obj/*.o".
Notes: - In the 'clean' target, the "core*" arg to 'rm' was removed as I find it too unspecific. (Someone could have an unrelated file with that prefix lying around.) - The targets 'clean' and 'veryclean' now echo the commands they are about to execute. Also, in Makefile.common, resurrect sanitized Clang builds if DEBUGANYWAY=2 is passed (previously, that was triggered with RELEASE=0 DEBUGANYWAY=1). git-svn-id: https://svn.eduke32.com/eduke32@4756 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
9907e79a0b
commit
7275152b86
2 changed files with 36 additions and 30 deletions
|
@ -339,10 +339,6 @@ COMMON_EDITOR_OBJS_EXP:=$(addprefix $(DUKE3D_OBJ)/,$(addsuffix .$o,$(COMMON_EDIT
|
||||||
DUKE3D_OBJS_EXP:=$(addprefix $(DUKE3D_OBJ)/,$(addsuffix .$o,$(DUKE3D_OBJS)))
|
DUKE3D_OBJS_EXP:=$(addprefix $(DUKE3D_OBJ)/,$(addsuffix .$o,$(DUKE3D_OBJS)))
|
||||||
DUKE3D_EDITOR_OBJS_EXP:=$(addprefix $(DUKE3D_OBJ)/,$(addsuffix .$o,$(DUKE3D_EDITOR_OBJS)))
|
DUKE3D_EDITOR_OBJS_EXP:=$(addprefix $(DUKE3D_OBJ)/,$(addsuffix .$o,$(DUKE3D_EDITOR_OBJS)))
|
||||||
|
|
||||||
LUNATIC_COMMON_OBJS_EXP := $(addprefix $(DUKE3D_OBJ)/,$(addsuffix .$o,$(LUNATIC_COMMON_OBJS)))
|
|
||||||
LUNATIC_GAME_OBJS_EXP := $(addprefix $(DUKE3D_OBJ)/,$(addsuffix .$o,$(LUNATIC_GAME_OBJS)))
|
|
||||||
LUNATIC_OBJS_EXP := $(LUNATIC_COMMON_OBJS_EXP) $(LUNATIC_GAME_OBJS_EXP)
|
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(PRETTY_OUTPUT),1)
|
ifeq ($(PRETTY_OUTPUT),1)
|
||||||
.SILENT:
|
.SILENT:
|
||||||
|
@ -606,10 +602,13 @@ $(DUKE3D_RSRC)/editor_banner.c: $(DUKE3D_RSRC)/build.bmp
|
||||||
$(ENGINE_OBJ) $(AUDIOLIB_OBJ) $(ENET_OBJ) $(DUKE3D_OBJ) $(TESTGAME_OBJ):
|
$(ENGINE_OBJ) $(AUDIOLIB_OBJ) $(ENET_OBJ) $(DUKE3D_OBJ) $(TESTGAME_OBJ):
|
||||||
mkdir $@
|
mkdir $@
|
||||||
|
|
||||||
# PHONIES
|
## PHONIES
|
||||||
|
|
||||||
|
# Delete executables, object files created from sources in source/, and
|
||||||
|
# miscellaneous generated files related to Lunatic on non-Linux.
|
||||||
clean:
|
clean:
|
||||||
-rm -f $(EDUKE32) $(MAPSTER32) $(LUNATIC_OBJS_EXP) $(COMMON_OBJS_EXP) $(DUKE3D_OBJS_EXP) $(COMMON_EDITOR_OBJS_EXP) $(DUKE3D_EDITOR_OBJS_EXP) $(DUKE3D_MISCDEPS) $(DUKE3D_EDITOR_MISCDEPS) core*
|
echo "rm -f $(EDUKE32) $(MAPSTER32) $(DUKE3D_OBJ)/*.o $(DUKE3D_MISCDEPS) $(DUKE3D_EDITOR_MISCDEPS)"
|
||||||
|
-rm -f $(EDUKE32) $(MAPSTER32) $(DUKE3D_OBJ)/*.o $(DUKE3D_MISCDEPS) $(DUKE3D_EDITOR_MISCDEPS)
|
||||||
ifeq ($(PLATFORM),DARWIN)
|
ifeq ($(PLATFORM),DARWIN)
|
||||||
-rm -rf EDuke32.app Mapster32.app
|
-rm -rf EDuke32.app Mapster32.app
|
||||||
endif
|
endif
|
||||||
|
@ -621,7 +620,9 @@ cleanutils:
|
||||||
-rm -f $(addsuffix $(EXESUFFIX),$(UTILS) $(GAMEUTILS)) $(addprefix $(ENGINE_OBJ)/,$(addsuffix .$o,$(UTILS))) $(addprefix $(DUKE3D_OBJ)/,$(addsuffix .$o,$(GAMEUTILS))) $(addsuffix $(EXESUFFIX),$(DXUTILS)) $(addprefix $(ENGINE_OBJ)/,$(addsuffix .$o,$(DXUTILS))) $(addsuffix $(EXESUFFIX),$(SDLUTILS)) $(addprefix $(ENGINE_OBJ)/,$(addsuffix .$o,$(SDLUTILS))) $(UTIL_OBJS_EXP)
|
-rm -f $(addsuffix $(EXESUFFIX),$(UTILS) $(GAMEUTILS)) $(addprefix $(ENGINE_OBJ)/,$(addsuffix .$o,$(UTILS))) $(addprefix $(DUKE3D_OBJ)/,$(addsuffix .$o,$(GAMEUTILS))) $(addsuffix $(EXESUFFIX),$(DXUTILS)) $(addprefix $(ENGINE_OBJ)/,$(addsuffix .$o,$(DXUTILS))) $(addsuffix $(EXESUFFIX),$(SDLUTILS)) $(addprefix $(ENGINE_OBJ)/,$(addsuffix .$o,$(SDLUTILS))) $(UTIL_OBJS_EXP)
|
||||||
|
|
||||||
veryclean: clean cleanutils
|
veryclean: clean cleanutils
|
||||||
-rm -f $(ENGINE_EDITOR_OBJS_EXP) $(ENGINE_OBJS_EXP) $(AUDIOLIB_OBJS_EXP) $(ENET_OBJS_EXP) $(DUKE3D_RSRC)/*banner* $(EBACKTRACEDLL)
|
echo "Removed test game and utils objects."
|
||||||
|
echo "rm -f $(ENGINE_OBJ)/*.o $(AUDIOLIB_OBJ)/*.o $(ENET_OBJ)/*.o $(DUKE3D_RSRC)/*banner* $(EBACKTRACEDLL)"
|
||||||
|
-rm -f $(ENGINE_OBJ)/*.o $(AUDIOLIB_OBJ)/*.o $(ENET_OBJ)/*.o $(DUKE3D_RSRC)/*banner* $(EBACKTRACEDLL)
|
||||||
|
|
||||||
printutils:
|
printutils:
|
||||||
echo "$(addsuffix $(EXESUFFIX),$(UTILS) $(GAMEUTILS))"
|
echo "$(addsuffix $(EXESUFFIX),$(UTILS) $(GAMEUTILS))"
|
||||||
|
|
|
@ -190,7 +190,9 @@ endif
|
||||||
# Debugging/Build options
|
# Debugging/Build options
|
||||||
# CPLUSPLUS - 1 = enable C++ building
|
# CPLUSPLUS - 1 = enable C++ building
|
||||||
# RELEASE - 1 = no debugging
|
# RELEASE - 1 = no debugging
|
||||||
# DEBUGANYWAY - 1 = include debug symbols even when generating release code
|
# DEBUGANYWAY:
|
||||||
|
# 1 = Include debug symbols even when generating release code.
|
||||||
|
# 2 = Also enable sanitizers with Clang. On the C side, make 'sprite' etc. be real arrays.
|
||||||
# DISABLEINLINING - 1 = compile inline functions as extern __fastcall instead of static inline
|
# DISABLEINLINING - 1 = compile inline functions as extern __fastcall instead of static inline
|
||||||
# FORCEWARNINGS - 1 = do not disable any compiler warnings within the source
|
# FORCEWARNINGS - 1 = do not disable any compiler warnings within the source
|
||||||
# KRANDDEBUG - 1 = include logging of krand() calls for debugging the demo system
|
# KRANDDEBUG - 1 = include logging of krand() calls for debugging the demo system
|
||||||
|
@ -379,6 +381,7 @@ ifneq (0,$(KRANDDEBUG))
|
||||||
RELEASE=0
|
RELEASE=0
|
||||||
endif
|
endif
|
||||||
ifneq (0,$(PROFILER))
|
ifneq (0,$(PROFILER))
|
||||||
|
# XXX: Why?
|
||||||
DEBUGANYWAY=1
|
DEBUGANYWAY=1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -423,12 +426,14 @@ endif
|
||||||
# See http://clang.llvm.org/docs/UsersManual.html#controlling-code-generation
|
# See http://clang.llvm.org/docs/UsersManual.html#controlling-code-generation
|
||||||
# for a list of possible UBSan options.
|
# for a list of possible UBSan options.
|
||||||
# Clang 3.2 does only supports -fsanitize=address for the AddressSanitizer
|
# Clang 3.2 does only supports -fsanitize=address for the AddressSanitizer
|
||||||
# CLANG_DEBUG_FLAGS := -fsanitize=address -fsanitize=bounds,enum,float-cast-overflow,object-size -fsanitize-undefined-trap-on-error
|
CLANG_DEBUG_FLAGS := -fsanitize=address -fsanitize=bounds,enum,float-cast-overflow,object-size
|
||||||
# CLANG_DEBUG_FLAGS := $(CLANG_DEBUG_FLAGS),signed-integer-overflow
|
#CLANG_DEBUG_FLAGS := $(CLANG_DEBUG_FLAGS),signed-integer-overflow
|
||||||
# CLANG_DEBUG_FLAGS := $(CLANG_DEBUG_FLAGS),unsigned-integer-overflow
|
#CLANG_DEBUG_FLAGS := $(CLANG_DEBUG_FLAGS),unsigned-integer-overflow
|
||||||
|
#CLANG_DEBUG_FLAGS := $(CLANG_DEBUG_FLAGS) -fsanitize-undefined-trap-on-error
|
||||||
|
|
||||||
ifneq (0,$(RELEASE))
|
ifneq (0,$(RELEASE))
|
||||||
# Debugging disabled
|
## Debugging disabled
|
||||||
|
|
||||||
ifeq (0,$(CLANG))
|
ifeq (0,$(CLANG))
|
||||||
COMMONFLAGS += -funswitch-loops
|
COMMONFLAGS += -funswitch-loops
|
||||||
ifeq (1,$(strip $(shell expr $(GCC_MAJOR) \< 4)))
|
ifeq (1,$(strip $(shell expr $(GCC_MAJOR) \< 4)))
|
||||||
|
@ -446,39 +451,39 @@ ifneq (0,$(RELEASE))
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq (0,$(DEBUGANYWAY))
|
ifeq (0,$(DEBUGANYWAY))
|
||||||
COMMONFLAGS += -fomit-frame-pointer
|
COMMONFLAGS += -fomit-frame-pointer
|
||||||
COMPILERFLAGS += -DNDEBUG
|
COMPILERFLAGS += -DNDEBUG
|
||||||
else
|
else
|
||||||
COMPILERFLAGS += -DDEBUGGINGAIDS
|
# Our $(DEBUGANYWAY) -> DEBUGGINGAIDS #define
|
||||||
# ifneq (0,$(CLANG))
|
COMPILERFLAGS += -DDEBUGGINGAIDS=$(DEBUGANYWAY)
|
||||||
# COMMONFLAGS += $(CLANG_DEBUG_FLAGS)
|
ifneq (0,$(CLANG))
|
||||||
# endif
|
ifeq (2,$(DEBUGANYWAY))
|
||||||
|
COMMONFLAGS += $(CLANG_DEBUG_FLAGS)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq (0,$(LTO))
|
ifneq (0,$(LTO))
|
||||||
COMPILERFLAGS += -DUSING_LTO
|
COMPILERFLAGS += -DUSING_LTO
|
||||||
COMMONFLAGS += -flto
|
COMMONFLAGS += -flto
|
||||||
# We don't need the following since we don't make intermediate .a files any more.
|
|
||||||
# ifeq (1,$(strip $(shell expr $(GCC_MAJOR) \>= 4)))
|
|
||||||
# ifeq (1,$(strip $(shell expr $(GCC_MINOR) \>= 9)))
|
|
||||||
# COMMONFLAGS += -ffat-lto-objects
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
# Debugging enabled
|
## Debugging enabled
|
||||||
ifeq (0,$(DEBUGANYWAY))
|
|
||||||
COMPILERFLAGS += -DDEBUGGINGAIDS
|
# Our $(DEBUGANYWAY) -> DEBUGGINGAIDS #define
|
||||||
else
|
COMPILERFLAGS += -DDEBUGGINGAIDS=$(DEBUGANYWAY)
|
||||||
COMPILERFLAGS += -DDEBUGGINGAIDS=2
|
ifneq (0,$(CLANG))
|
||||||
|
ifeq (2,$(DEBUGANYWAY))
|
||||||
|
COMMONFLAGS += $(CLANG_DEBUG_FLAGS)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# ifneq (0,$(CLANG))
|
|
||||||
# COMMONFLAGS += $(CLANG_DEBUG_FLAGS)
|
|
||||||
# endif
|
|
||||||
ifeq ($(SUBPLATFORM),LINUX)
|
ifeq ($(SUBPLATFORM),LINUX)
|
||||||
LIBS+=-rdynamic
|
LIBS+=-rdynamic
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq (0,$(MUDFLAP))
|
ifneq (0,$(MUDFLAP))
|
||||||
LIBS+= -lmudflapth
|
LIBS+= -lmudflapth
|
||||||
COMMONFLAGS += -fmudflapth
|
COMMONFLAGS += -fmudflapth
|
||||||
|
|
Loading…
Reference in a new issue