mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-04 01:46:42 +00:00
CONFIGURE: TEMP: Add support to build detection features as dynamic.
- A commit to show how the new makefiles structure and flow would look like. This is not final.
This commit is contained in:
parent
ff74297940
commit
05e170415c
41
configure
vendored
41
configure
vendored
@ -241,6 +241,8 @@ PANDOC=""
|
||||
_pandocpath="$PATH"
|
||||
_pandocformat="default"
|
||||
_pandocext="default"
|
||||
# Detection features to be linked into executable or not
|
||||
_detection_features_static="true"
|
||||
# The following variables are automatically detected, and should not
|
||||
# be modified otherwise. Consider them read-only.
|
||||
_posix=no
|
||||
@ -1022,6 +1024,8 @@ Game engines:
|
||||
$engines_help
|
||||
Optional Features:
|
||||
--enable-static build a static binary instead of using shared objects
|
||||
--enable-detection-static build detection features into executable (default)
|
||||
--enable-detection-dynamic build detection features into a library
|
||||
--enable-c++11 build as C++11 if the compiler allows that
|
||||
--disable-debug disable building with debugging symbols
|
||||
--enable-Werror treat warnings as errors
|
||||
@ -1221,6 +1225,8 @@ for ac_option in $@; do
|
||||
--enable-dependency-tracking) ;;
|
||||
# End of ignored options.
|
||||
--enable-static) _static_build=yes ;;
|
||||
--enable-detection-static) _detection_features_static="true";;
|
||||
--enable-detection-dynamic) _detection_features_static="false";;
|
||||
--disable-16bit) _16bit=no ;;
|
||||
--enable-highres) _highres=yes ;;
|
||||
--disable-highres) _highres=no ;;
|
||||
@ -6139,6 +6145,8 @@ for engine in $_sorted_engines; do
|
||||
# main engine
|
||||
cat >> engines/engines.mk << EOF
|
||||
|
||||
MODULES += engines/$engine/detection
|
||||
|
||||
ifdef ENABLE_$j
|
||||
DEFINES += -DENABLE_$j=\$(ENABLE_$j)
|
||||
MODULES += engines/$engine
|
||||
@ -6160,6 +6168,14 @@ EOF
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "${_detection_features_static}" == "false" ]; then
|
||||
cat >> engines/engines.mk << EOF
|
||||
|
||||
# This build was configured to use detection as a dynamic plugin.
|
||||
MODULES += detection
|
||||
EOF
|
||||
fi
|
||||
|
||||
declare -a static_detect_engines=("PLUMBERS" "AGI" "SCUMM" "SKY" "DREAMWEB" "DRASCULA" "LURE"
|
||||
"SWORD1" "SWORD2" "SWORD25" "ADL" "QUEEN" "CGE" "CGE2" "ACCESS"
|
||||
"ZVISION" "AGOS" "GOB" "COMPOSER" "DM" "DRACI" "DRAGONS" "GNAP"
|
||||
@ -6173,6 +6189,29 @@ declare -a static_detect_engines=("PLUMBERS" "AGI" "SCUMM" "SKY" "DREAMWEB" "DRA
|
||||
"FULLPIPE" "SAGA" "XEEN" "WINTERMUTE" "SCI" "MOHAWK" "ULTIMA" "GLK")
|
||||
detectId="_DETECTION"
|
||||
|
||||
##################################################
|
||||
|
||||
declare -a engi=("AGI" "PLUMBERS")
|
||||
|
||||
echo "Creating detection/detection_table.h"
|
||||
cat > detection/detection_table.h << EOF
|
||||
/* This file is automatically generated by configure */
|
||||
/* DO NOT EDIT MANUALLY */
|
||||
// This file is being included by "detection/detection.cpp"
|
||||
EOF
|
||||
|
||||
# Below line, we'll have for each engine in sorted engines: LINK_PLUGIN-detection.
|
||||
# Temporary to see, we have 2 engines.
|
||||
# Once each engine's modules are shifted in the same way as these 2, we can remove the array
|
||||
# and do it for all engines.
|
||||
for engine in "${engi[@]}"; do
|
||||
cat >> detection/detection_table.h << EOF
|
||||
LINK_PLUGIN(${engine}${detectId})
|
||||
EOF
|
||||
done
|
||||
|
||||
##################################################
|
||||
|
||||
echo "Creating engines/plugins_table.h"
|
||||
cat > engines/plugins_table.h << EOF
|
||||
/* This file is automatically generated by configure */
|
||||
@ -6187,7 +6226,7 @@ for engine in $_sorted_engines; do
|
||||
if [ $j == $eng ]; then
|
||||
cat >> engines/plugins_table.h << EOF
|
||||
#if PLUGIN_ENABLED($j)
|
||||
LINK_PLUGIN(${j}${detectId})
|
||||
//LINK_PLUGIN(${j}${detectId})
|
||||
#endif
|
||||
EOF
|
||||
cat >> engines/plugins_table.h << EOF
|
||||
|
Loading…
x
Reference in New Issue
Block a user