BUILD: MAKEFILE: Introduce DETECT_OBJS variable. Executable depends on it.

Note: No detection objects added currently. It's just an empty variable uptill now.
- These DETECT_OBJS will be seen in action in the new commits
- They contain engine_name/detection.o
- They have MetaEngine code, which has detection features.
- This way, Executable will have linked against the detection.o files
- Detection.cpp files will be individually compilable and not dependent on engine
This commit is contained in:
aryanrawlani28 2020-07-16 02:15:59 +05:30 committed by Eugene Sandulenko
parent 365b1101f3
commit 28dc54940f
2 changed files with 5 additions and 2 deletions

View File

@ -15,6 +15,9 @@ DEPDIR := .deps
MODULES :=
MODULE_DIRS :=
# All game detection-related object files for engines
DETECT_OBJS :=
# Load the make rules generated by configure
-include config.mk

View File

@ -86,7 +86,7 @@ endif
endif
# The build rule for the ScummVM executable
$(EXECUTABLE): $(OBJS)
$(EXECUTABLE): $(OBJS) $(DETECT_OBJS)
$(QUIET_LINK)$(LD) $(LDFLAGS) $(PRE_OBJS_FLAGS) $+ $(POST_OBJS_FLAGS) $(LIBS) -o $@
ifdef SPLIT_DWARF
@ -99,7 +99,7 @@ distclean: clean clean-devtools
clean:
$(RM_REC) $(DEPDIRS)
$(RM) $(OBJS) $(EXECUTABLE)
$(RM) $(OBJS) $(DETECT_OBJS) $(EXECUTABLE)
ifdef SPLIT_DWARF
$(RM) $(OBJS:.o=.dwo)
$(RM) $(EXECUTABLE).dwp