Makefile: Separate combinations of component objects for the six build targets into a variable specifically representing the combination.

The original variable name now contains the sub-group only.

git-svn-id: https://svn.eduke32.com/eduke32@6105 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2017-03-23 20:47:03 +00:00
parent f0b73188ed
commit 5de3318812

View file

@ -348,6 +348,9 @@ endif
KENBUILD_GAME_OBJS_EXP:=$(call expandobjs,$(KENBUILD_OBJ)/,$(KENBUILD_GAME_OBJS) $(KENBUILD_GAME_RSRC_OBJS))
KENBUILD_EDITOR_OBJS_EXP:=$(call expandobjs,$(KENBUILD_OBJ)/,$(KENBUILD_EDITOR_OBJS) $(KENBUILD_EDITOR_RSRC_OBJS))
KENBUILD_GAME_OBJS_TARGET=$(KENBUILD_GAME_OBJS_EXP)
KENBUILD_EDITOR_OBJS_TARGET=$(KENBUILD_EDITOR_OBJS_EXP)
# Duke Nukem 3D
@ -578,18 +581,23 @@ endif
## Construct file names of object files
COMMON_EDITOR_OBJS_EXP:=$(call expandobjs,$(DUKE3D_OBJ)/,$(COMMON_EDITOR_OBJS)) $(ENGINE_EDITOR_OBJS_EXP)
COMMON_EDITOR_OBJS_EXP:=$(call expandobjs,$(DUKE3D_OBJ)/,$(COMMON_EDITOR_OBJS))
COMMON_EDITOR_OBJS_TARGET=$(COMMON_EDITOR_OBJS_EXP) $(ENGINE_EDITOR_OBJS_EXP)
MIDI_OBJS_EXP:=$(call expandobjs,$(DUKE3D_OBJ)/,$(MIDI_OBJS))
DUKE3D_GAME_OBJS_EXP:=$(call expandobjs,$(DUKE3D_OBJ)/,$(DUKE3D_GAME_OBJS) $(DUKE3D_GAME_RSRC_OBJS)) $(MIDI_OBJS_EXP) $(AUDIOLIB_OBJS_EXP) $(MACT_OBJS_EXP) $(ENET_OBJS_EXP)
DUKE3D_EDITOR_OBJS_EXP:=$(call expandobjs,$(DUKE3D_OBJ)/,$(DUKE3D_EDITOR_OBJS) $(DUKE3D_EDITOR_RSRC_OBJS)) $(AUDIOLIB_OBJS_EXP)
DUKE3D_GAME_OBJS_EXP:=$(call expandobjs,$(DUKE3D_OBJ)/,$(DUKE3D_GAME_OBJS) $(DUKE3D_GAME_RSRC_OBJS))
DUKE3D_EDITOR_OBJS_EXP:=$(call expandobjs,$(DUKE3D_OBJ)/,$(DUKE3D_EDITOR_OBJS) $(DUKE3D_EDITOR_RSRC_OBJS))
ifneq (0,$(LUNATIC))
DUKE3D_GAME_OBJS_EXP+= $(call expandobjs,$(DUKE3D_OBJ)/,$(LUNATIC_GAME_OBJS) $(addprefix $(LUNATIC_LUA_PREFIX),$(LUNATIC_LUA_OBJS) $(LUNATIC_GAME_LUA_OBJS)))
DUKE3D_EDITOR_OBJS_EXP+= $(call expandobjs,$(DUKE3D_OBJ)/,$(LUNATIC_EDITOR_OBJS) $(addprefix $(LUNATIC_LUA_PREFIX),$(LUNATIC_LUA_OBJS) $(LUNATIC_EDITOR_LUA_OBJS)))
endif
DUKE3D_GAME_OBJS_TARGET=$(DUKE3D_GAME_OBJS_EXP) $(MIDI_OBJS_EXP) $(AUDIOLIB_OBJS_EXP) $(MACT_OBJS_EXP) $(ENET_OBJS_EXP)
DUKE3D_EDITOR_OBJS_TARGET=$(DUKE3D_EDITOR_OBJS_EXP) $(AUDIOLIB_OBJS_EXP)
# Shadow Warrior
SW=sw
@ -709,8 +717,11 @@ ifeq ($(PLATFORM),WINDOWS)
SW_EDITOR_RSRC_OBJS+= buildres.rc
endif
SW_GAME_OBJS_EXP:=$(call expandobjs,$(SW_OBJ)/,$(SW_GAME_OBJS) $(SW_GAME_RSRC_OBJS)) $(MIDI_OBJS_EXP) $(AUDIOLIB_OBJS_EXP) $(MACT_OBJS_EXP)
SW_EDITOR_OBJS_EXP:=$(call expandobjs,$(SW_OBJ)/,$(SW_EDITOR_OBJS) $(SW_EDITOR_RSRC_OBJS)) $(AUDIOLIB_OBJS_EXP)
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_GAME_OBJS_TARGET=$(SW_GAME_OBJS_EXP) $(MIDI_OBJS_EXP) $(AUDIOLIB_OBJS_EXP) $(MACT_OBJS_EXP)
SW_EDITOR_OBJS_TARGET=$(SW_EDITOR_OBJS_EXP) $(AUDIOLIB_OBJS_EXP)
### component definitions end
@ -778,7 +789,7 @@ endif
define BUILDRULE
$$($1_$2)$$(EXESUFFIX): $$($1_$2_OBJS_EXP) $$(COMMON_$2_OBJS_EXP) $$(ENGINE_OBJS_EXP) $$($1_$2_MISCDEPS)
$$($1_$2)$$(EXESUFFIX): $$($1_$2_OBJS_TARGET) $$(COMMON_$2_OBJS_TARGET) $$(ENGINE_OBJS_EXP) $$($1_$2_MISCDEPS)
$$(LINK_STATUS)
$$(RECIPE_IF) $$(LINKER) -o $$@ $$^ $$(GUI_LIBS) $$($1_$2_LDFLAGS) $$(LIBDIRS) $$(LIBS) $$(RECIPE_RESULT_LINK)
ifeq ($$(PLATFORM),WII)