Makefile: Rename some groups so that the part before the first _ corresponds to the parent group that has _SRC and _OBJ defines.

git-svn-id: https://svn.eduke32.com/eduke32@6152 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2017-06-09 06:38:58 +00:00
parent f81f6b76e6
commit 6d990b592e

View file

@ -384,7 +384,7 @@ endif
DUKE3D_GAME_PROPER ?= EDuke32 DUKE3D_GAME_PROPER ?= EDuke32
DUKE3D_EDITOR_PROPER ?= Mapster32 DUKE3D_EDITOR_PROPER ?= Mapster32
COMMON_EDITOR_OBJS = \ DUKE3D_COMMON_EDITOR_OBJS = \
m32common.cpp \ m32common.cpp \
m32def.cpp \ m32def.cpp \
m32exec.cpp \ m32exec.cpp \
@ -437,7 +437,8 @@ DUKE3D_GAME_ORDERONLYDEPS=
DUKE3D_EDITOR_ORDERONLYDEPS= DUKE3D_EDITOR_ORDERONLYDEPS=
## Lunatic devel ## Lunatic devel
LUNATIC_SRC = $(DUKE3D_SRC)/lunatic LUNATIC_SRC=$(DUKE3D_SRC)/lunatic
LUNATIC_OBJ=$(DUKE3D_OBJ)
ifneq (0,$(LUNATIC)) ifneq (0,$(LUNATIC))
COMPILERFLAGS += -I$(LUNATIC_SRC) -DLUNATIC COMPILERFLAGS += -I$(LUNATIC_SRC) -DLUNATIC
@ -570,7 +571,7 @@ ifeq ($(PLATFORM),WINDOWS)
endif endif
ifeq ($(MIXERTYPE),WIN) ifeq ($(MIXERTYPE),WIN)
LIBS+= -ldsound LIBS+= -ldsound
MIDI_OBJS=music.cpp midi.cpp mpu401.cpp DUKE3D_COMMON_MIDI_OBJS=music.cpp midi.cpp mpu401.cpp
endif endif
endif endif
@ -588,17 +589,17 @@ ifeq ($(RENDERTYPE),SDL)
DUKE3D_EDITOR_RSRC_OBJS+= build_icon.c DUKE3D_EDITOR_RSRC_OBJS+= build_icon.c
endif endif
ifeq ($(MIXERTYPE),SDL) ifeq ($(MIXERTYPE),SDL)
MIDI_OBJS=sdlmusic.cpp DUKE3D_COMMON_MIDI_OBJS=sdlmusic.cpp
endif endif
COMMON_EDITOR_SRCS:=$(addprefix $(DUKE3D_SRC)/,$(COMMON_EDITOR_OBJS)) DUKE3D_COMMON_EDITOR_SRCS:=$(addprefix $(DUKE3D_SRC)/,$(DUKE3D_COMMON_EDITOR_OBJS))
COMMON_EDITOR_OBJS_EXP:=$(call expandobjs,$(DUKE3D_OBJ)/,$(COMMON_EDITOR_OBJS)) DUKE3D_COMMON_EDITOR_OBJS_EXP:=$(call expandobjs,$(DUKE3D_OBJ)/,$(DUKE3D_COMMON_EDITOR_OBJS))
COMMON_EDITOR_SRCS_TARGET=$(COMMON_EDITOR_SRCS) $(ENGINE_EDITOR_SRCS) DUKE3D_COMMON_EDITOR_SRCS_TARGET=$(DUKE3D_COMMON_EDITOR_SRCS) $(ENGINE_EDITOR_SRCS)
COMMON_EDITOR_OBJS_TARGET=$(COMMON_EDITOR_OBJS_EXP) $(ENGINE_EDITOR_OBJS_EXP) DUKE3D_COMMON_EDITOR_OBJS_TARGET=$(DUKE3D_COMMON_EDITOR_OBJS_EXP) $(ENGINE_EDITOR_OBJS_EXP)
MIDI_SRCS:=$(addprefix $(DUKE3D_SRC)/,$(MIDI_OBJS)) DUKE3D_COMMON_MIDI_SRCS:=$(addprefix $(DUKE3D_SRC)/,$(DUKE3D_COMMON_MIDI_OBJS))
MIDI_OBJS_EXP:=$(call expandobjs,$(DUKE3D_OBJ)/,$(MIDI_OBJS)) DUKE3D_COMMON_MIDI_OBJS_EXP:=$(call expandobjs,$(DUKE3D_OBJ)/,$(DUKE3D_COMMON_MIDI_OBJS))
DUKE3D_GAME_SRCS:=$(addprefix $(DUKE3D_SRC)/,$(DUKE3D_GAME_OBJS)) DUKE3D_GAME_SRCS:=$(addprefix $(DUKE3D_SRC)/,$(DUKE3D_GAME_OBJS))
DUKE3D_EDITOR_SRCS:=$(addprefix $(DUKE3D_SRC)/,$(DUKE3D_EDITOR_OBJS)) DUKE3D_EDITOR_SRCS:=$(addprefix $(DUKE3D_SRC)/,$(DUKE3D_EDITOR_OBJS))
@ -608,13 +609,13 @@ DUKE3D_EDITOR_OBJS_EXP:=$(call expandobjs,$(DUKE3D_OBJ)/,$(DUKE3D_EDITOR_OBJS) $
ifneq (0,$(LUNATIC)) ifneq (0,$(LUNATIC))
DUKE3D_GAME_SRCS+= $(addprefix $(LUNATIC_SRC)/,$(LUNATIC_GAME_OBJS) $(LUNATIC_LUA_OBJS) $(LUNATIC_GAME_LUA_OBJS)) DUKE3D_GAME_SRCS+= $(addprefix $(LUNATIC_SRC)/,$(LUNATIC_GAME_OBJS) $(LUNATIC_LUA_OBJS) $(LUNATIC_GAME_LUA_OBJS))
DUKE3D_EDITOR_SRCS+= $(addprefix $(LUNATIC_SRC)/,$(LUNATIC_EDITOR_OBJS) $(LUNATIC_LUA_OBJS) $(LUNATIC_EDITOR_LUA_OBJS)) DUKE3D_EDITOR_SRCS+= $(addprefix $(LUNATIC_SRC)/,$(LUNATIC_EDITOR_OBJS) $(LUNATIC_LUA_OBJS) $(LUNATIC_EDITOR_LUA_OBJS))
DUKE3D_GAME_OBJS_EXP+= $(call expandobjs,$(DUKE3D_OBJ)/,$(LUNATIC_GAME_OBJS) $(LUNATIC_LUA_OBJS) $(LUNATIC_GAME_LUA_OBJS)) DUKE3D_GAME_OBJS_EXP+= $(call expandobjs,$(LUNATIC_OBJ)/,$(LUNATIC_GAME_OBJS) $(LUNATIC_LUA_OBJS) $(LUNATIC_GAME_LUA_OBJS))
DUKE3D_EDITOR_OBJS_EXP+= $(call expandobjs,$(DUKE3D_OBJ)/,$(LUNATIC_EDITOR_OBJS) $(LUNATIC_LUA_OBJS) $(LUNATIC_EDITOR_LUA_OBJS)) DUKE3D_EDITOR_OBJS_EXP+= $(call expandobjs,$(LUNATIC_OBJ)/,$(LUNATIC_EDITOR_OBJS) $(LUNATIC_LUA_OBJS) $(LUNATIC_EDITOR_LUA_OBJS))
endif endif
DUKE3D_GAME_SRCS_TARGET=$(DUKE3D_GAME_SRCS) $(MIDI_SRCS) $(AUDIOLIB_SRCS) $(MACT_SRCS) $(ENET_SRCS) DUKE3D_GAME_SRCS_TARGET=$(DUKE3D_GAME_SRCS) $(DUKE3D_COMMON_MIDI_SRCS) $(AUDIOLIB_SRCS) $(MACT_SRCS) $(ENET_SRCS)
DUKE3D_EDITOR_SRCS_TARGET=$(DUKE3D_EDITOR_SRCS) $(AUDIOLIB_SRCS) DUKE3D_EDITOR_SRCS_TARGET=$(DUKE3D_EDITOR_SRCS) $(AUDIOLIB_SRCS)
DUKE3D_GAME_OBJS_TARGET=$(DUKE3D_GAME_OBJS_EXP) $(MIDI_OBJS_EXP) $(AUDIOLIB_OBJS_EXP) $(MACT_OBJS_EXP) $(ENET_OBJS_EXP) DUKE3D_GAME_OBJS_TARGET=$(DUKE3D_GAME_OBJS_EXP) $(DUKE3D_COMMON_MIDI_OBJS_EXP) $(AUDIOLIB_OBJS_EXP) $(MACT_OBJS_EXP) $(ENET_OBJS_EXP)
DUKE3D_EDITOR_OBJS_TARGET=$(DUKE3D_EDITOR_OBJS_EXP) $(AUDIOLIB_OBJS_EXP) DUKE3D_EDITOR_OBJS_TARGET=$(DUKE3D_EDITOR_OBJS_EXP) $(AUDIOLIB_OBJS_EXP)
@ -741,9 +742,9 @@ SW_EDITOR_SRCS:=$(addprefix $(SW_SRC)/,$(SW_EDITOR_OBJS))
SW_GAME_OBJS_EXP:=$(call expandobjs,$(SW_OBJ)/,$(SW_GAME_OBJS) $(SW_GAME_RSRC_OBJS)) SW_GAME_OBJS_EXP:=$(call expandobjs,$(SW_OBJ)/,$(SW_GAME_OBJS) $(SW_GAME_RSRC_OBJS))
SW_EDITOR_OBJS_EXP:=$(call expandobjs,$(SW_OBJ)/,$(SW_EDITOR_OBJS) $(SW_EDITOR_RSRC_OBJS)) SW_EDITOR_OBJS_EXP:=$(call expandobjs,$(SW_OBJ)/,$(SW_EDITOR_OBJS) $(SW_EDITOR_RSRC_OBJS))
SW_GAME_SRCS_TARGET=$(SW_GAME_SRCS) $(MIDI_SRCS) $(AUDIOLIB_SRCS) $(MACT_SRCS) SW_GAME_SRCS_TARGET=$(SW_GAME_SRCS) $(DUKE3D_COMMON_MIDI_SRCS) $(AUDIOLIB_SRCS) $(MACT_SRCS)
SW_EDITOR_SRCS_TARGET=$(SW_EDITOR_SRCS) $(AUDIOLIB_SRCS) SW_EDITOR_SRCS_TARGET=$(SW_EDITOR_SRCS) $(AUDIOLIB_SRCS)
SW_GAME_OBJS_TARGET=$(SW_GAME_OBJS_EXP) $(MIDI_OBJS_EXP) $(AUDIOLIB_OBJS_EXP) $(MACT_OBJS_EXP) SW_GAME_OBJS_TARGET=$(SW_GAME_OBJS_EXP) $(DUKE3D_COMMON_MIDI_OBJS_EXP) $(AUDIOLIB_OBJS_EXP) $(MACT_OBJS_EXP)
SW_EDITOR_OBJS_TARGET=$(SW_EDITOR_OBJS_EXP) $(AUDIOLIB_OBJS_EXP) SW_EDITOR_OBJS_TARGET=$(SW_EDITOR_OBJS_EXP) $(AUDIOLIB_OBJS_EXP)
@ -813,7 +814,7 @@ endif
define BUILDRULE define BUILDRULE
$$($1_$2)$$(EXESUFFIX): $$($1_$2_OBJS_TARGET) $$(COMMON_$2_OBJS_TARGET) $$(ENGINE_OBJS_EXP) $$($1_$2_MISCDEPS) | $$($1_$2_ORDERONLYDEPS) $$($1_$2)$$(EXESUFFIX): $$($1_$2_OBJS_TARGET) $$(DUKE3D_COMMON_$2_OBJS_TARGET) $$(ENGINE_OBJS_EXP) $$($1_$2_MISCDEPS) | $$($1_$2_ORDERONLYDEPS)
$$(LINK_STATUS) $$(LINK_STATUS)
$$(RECIPE_IF) $$(LINKER) -o $$@ $$^ $$(GUI_LIBS) $$($1_$2_LDFLAGS) $$(LIBDIRS) $$(LIBS) $$(RECIPE_RESULT_LINK) $$(RECIPE_IF) $$(LINKER) -o $$@ $$^ $$(GUI_LIBS) $$($1_$2_LDFLAGS) $$(LIBDIRS) $$(LIBS) $$(RECIPE_RESULT_LINK)
ifeq ($$(PLATFORM),WII) ifeq ($$(PLATFORM),WII)
@ -957,7 +958,7 @@ $(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)) clang-tools: $(filter %.c %.cpp %.m %.mm,$(DUKE3D_GAME_SRCS_TARGET) $(DUKE3D_EDITOR_SRCS_TARGET) $(DUKE3D_COMMON_EDITOR_SRCS_TARGET) $(ENGINE_SRCS))
echo $^ -- $(COMPILERFLAGS) $(foreach i,$(COMPONENTS),$($i_CFLAGS)) $(CWARNS) echo $^ -- $(COMPILERFLAGS) $(foreach i,$(COMPONENTS),$($i_CFLAGS)) $(CWARNS)
$(foreach i,$(GAMES),clean$($i)): $(foreach i,$(GAMES),clean$($i)):