@echo off setlocal EnableDelayedExpansion set "_errorlevel=0" rem The following bindings are determined by the configure script. The rem bindings for CORCXXFLAGS_GAMBUILD and LDFLAGS_GAMBUILD can be rem overridden by setting the corresponding environment variables. if defined CORCXXFLAGS_GAMBUILD goto :corcxxflags_done set CORCXXFLAGS_GAMBUILD=@CORCXXFLAGS_GAMBUILD_BAT@ :corcxxflags_done if defined LDFLAGS_GAMBUILD goto :ldflags_done set LDFLAGS_GAMBUILD=@LDFLAGS_GAMBUILD_BAT@ :ldflags_done set C_COMPILER=@C_COMPILER_BAT@ set C_PREPROC=@C_PREPROC_BAT@ set PKG_CONFIG=@PKG_CONFIG_BAT@ set FLAGS_OBJ=@FLAGS_OBJ_GAMBUILD_BAT@ set FLAGS_DYN=@FLAGS_DYN_GAMBUILD_BAT@ set FLAGS_LIB=@FLAGS_LIB_GAMBUILD_BAT@ set FLAGS_EXE=@FLAGS_EXE_GAMBUILD_BAT@ set FLAGS_OPT=@FLAGS_OPT_GAMBUILD_BAT@ set FLAGS_OPT_RTS=@FLAGS_OPT_RTS_GAMBUILD_BAT@ set DEFS_OBJ=@DEFS_OBJ_GAMBUILD_BAT@ set DEFS_DYN=@DEFS_DYN_GAMBUILD_BAT@ set DEFS_LIB=@DEFS_LIB_GAMBUILD_BAT@ set DEFS_EXE=@DEFS_EXE_GAMBUILD_BAT@ set BUILD_OBJ=@BUILD_OBJ_GAMBUILD_BAT@ set BUILD_DYN=@BUILD_DYN_GAMBUILD_BAT@ set BUILD_LIB=@BUILD_LIB_GAMBUILD_BAT@ set BUILD_EXE=@BUILD_EXE_GAMBUILD_BAT@ set DEFS=@DEFS_BAT@ set LIBS=@LIBS_BAT@ set GAMBITLIB=@GAMBITLIB_BAT@ set GAMBITGSCLIB=@GAMBITGSCLIB_BAT@ set GAMBITGSILIB=@GAMBITGSILIB_BAT@ set LIB_PREFIX=@LIB_PREFIX_BAT@ set LIB_EXTENSION=@LIB_EXTENSION_BAT@ set OBJ_EXTENSION=@OBJ_EXTENSION_BAT@ set EXE_EXTENSION=@EXE_EXTENSION_BAT@ set BAT_EXTENSION=@BAT_EXTENSION_BAT@ set ALL_BUILD_FEATURES=@ALL_BUILD_FEATURES_BAT@ set BUILD_FEATURE_C_COMP=@BUILD_FEATURE_C_COMP_BAT@ set BUILD_FEATURE_OS=windows goto :select_operation rem Creation of a fresh temporary directory :create_temp_dir set /a _temp_dir_seqnum=0 :create_temp_dir_loop set /a _temp_dir_seqnum+=1 set "_temp_dir=!temp!\!_temp_dir_basename!_dir!_temp_dir_seqnum!" mkdir "!_temp_dir!" 2> nul if ERRORLEVEL 1 goto :create_temp_dir_loop exit /b 0 rem Creation of a temporary batch file :create_temp_batch_file call :create_temp_dir set "_temp_batch_file=!_temp_dir!\gambuild-C-cmd.bat" echo.!_temp_batch_file_line1! > "!_temp_batch_file!" echo.!_temp_batch_file_line2! >> "!_temp_batch_file!" echo.!_temp_batch_file_line3! >> "!_temp_batch_file!" exit /b 0 rem Evaluation of a shell command :eval_shell_command if not "!GAMBUILD_VERBOSE!" == "yes" goto not_verbose echo.!_shell_command! :not_verbose set "_temp_batch_file_line1=@echo off" set "_temp_batch_file_line2=!_shell_command!" set "_temp_batch_file_line3=exit /b %%ERRORLEVEL%%" call :create_temp_batch_file call "!_temp_batch_file!" set "_errorlevel=%ERRORLEVEL%" rmdir /s /q "!_temp_dir!" exit /b %_errorlevel% rem Encoding of strings and paths using shell syntax :shell_string_encode if defined _arg ( set "_arg=!_arg:=""!" set "_arg=!_arg:=\!" set "_arg=!_arg:=^!" set "_arg=!_arg:=&!" set "_arg=!_arg:=|!" set "_arg=!_arg:=>!" set "_arg=!_arg:=!" set "_arg=!_arg:==!" set "_arg=!_arg:|=!" set "_arg=!_arg:&=!" set "_arg=!_arg:^=!" set "_arg=!_arg:\\=!" set "_arg=!_arg:\"=!" set "_arg=!_arg:\\a=!" set "_arg=!_arg:\\t=!" set "_arg=!_arg:\\v= !" set "_arg=!_arg:\\f= !" set "_arg=!_arg:\=!" exit /b 0 rem Plain string decoding :plain_string_decode set "_arg=!_arg: =!" set "_arg=!_arg:<=!" set "_arg=!_arg:>=!" set "_arg=!_arg:|=!" set "_arg=!_arg:&=!" set "_arg=!_arg:^=!" set "_arg=!_arg:\=!" set "_arg=!_arg:"=!" exit /b 0 rem Guard expression evaluation :eval_sexpr set "_sexpr_string1=!_sexpr:*"=!" set "_sexpr_string2=!_sexpr_string1:*"=!" if "!_sexpr_string2!" == "" goto :eval_sexpr_done if not "!_sexpr_string2!" == ")" goto :eval_sexpr_unsupported_expr set "_sexpr=)( !_sexpr:)= )!" for %%i in (%ALL_BUILD_FEATURES%) do ( set "_val=#f" if "%%i" == "%BUILD_FEATURE_C_COMP%" set "_val=#t" if "%%i" == "%BUILD_FEATURE_OS%" set "_val=#t" call :eval_sexpr_substitute_var %%i !_val! ) :eval_sexpr_loop set "_prev=!_sexpr!" set "_sexpr=!_sexpr:(and #t =(and !" set "_sexpr=!_sexpr:(and #f #t =(and #f !" set "_sexpr=!_sexpr:(and #f #f =(and #f !" set "_sexpr=!_sexpr:(and #f )=#f!" set "_sexpr=!_sexpr:(and )=#t!" set "_sexpr=!_sexpr:(or #f =(or !" set "_sexpr=!_sexpr:(or #t #t =(or #t !" set "_sexpr=!_sexpr:(or #t #f =(or #t !" set "_sexpr=!_sexpr:(or #t )=#t!" set "_sexpr=!_sexpr:(or )=#f!" set "_sexpr=!_sexpr:(not #t )=#f!" set "_sexpr=!_sexpr:(not #f )=#t!" if not "!_sexpr!" == "!_prev!" goto :eval_sexpr_loop if not "!_sexpr!" == "!_sexpr:)( (when #t =!" goto :eval_sexpr_when_true if not "!_sexpr!" == "!_sexpr:)( (when #f =!" set "_sexpr=)( !" :eval_sexpr_unsupported_expr set "_sexpr=unsupported expression" exit /b 0 :eval_sexpr_when_true set "_sexpr="!_sexpr_string1:")=!"" :eval_sexpr_done exit /b 0 :eval_sexpr_substitute_var set "_sexpr=!_sexpr: %1 = %2 !" exit /b 0 :for_each_line_of_var if not defined %for_each_line_of_var_var% goto :for_each_line_of_var_done for /f "tokens=1* delims==" %%i in ('set %for_each_line_of_var_var%') do ( if not "%%j" == "" ( set "_arg=%%j" call %for_each_line_of_var_handle% goto :for_each_line_of_var_continue ) goto :for_each_line_of_var_done ) :for_each_line_of_var_done exit /b %_errorlevel% :for_each_line_of_var_continue for /f "delims= skip=1" %%i in ('set %for_each_line_of_var_var%') do ( set "_arg=%%i" call %for_each_line_of_var_handle% if not "!_errorlevel!" == "0" goto :for_each_line_of_var_done2 ) :for_each_line_of_var_done2 exit /b %_errorlevel% :for_each_meta_info_of_file for /f "delims=# tokens=2*" %%i in ('findstr /r /c:^"^^^ ^#^|^\^*^/^\^"^\^*^/^\^"%for_each_meta_info_of_file_key%^|^#^" "%for_each_meta_info_of_file_file%"') do ( set "_arg=%%j" call :for_each_meta_info_of_file_filter if not "!_errorlevel!" == "0" goto :for_each_meta_info_of_file_done ) :for_each_meta_info_of_file_done exit /b %_errorlevel% :for_each_meta_info_of_file_filter set "_meta_info=!_arg!" call :sexpr_string_decode set "_sexpr=!_arg:= !" call :eval_sexpr if "!_sexpr!" == "" goto :for_each_meta_info_of_file_done if "!_sexpr!" == "unsupported expression" ( echo.*** WARNING -- unsupported meta-info is being ignored: !_meta_info! goto :for_each_meta_info_of_file_done ) set "_arg=!_sexpr: =!" set "_arg=!_sexpr:"=!" call %for_each_meta_info_of_file_handle% :for_each_meta_info_of_file_done exit /b %_errorlevel% :augment_pkg_config_path_from_files set "for_each_meta_info_of_file_file=%_arg%" set "for_each_meta_info_of_file_key=pkg-config-path" set "for_each_meta_info_of_file_handle=:accumulate_pkg_config_path" call :for_each_meta_info_of_file exit /b %_errorlevel% :augment_pkg_config_path_from_var call :plain_string_decode call :accumulate_pkg_config_path exit /b %_errorlevel% :process_pkg_config_from_files set "for_each_meta_info_of_file_file=%_arg%" set "for_each_meta_info_of_file_key=pkg-config" set "for_each_meta_info_of_file_handle=:process_pkg_config" call :for_each_meta_info_of_file exit /b %_errorlevel% :process_pkg_config_from_var call :plain_string_decode call :process_pkg_config exit /b %_errorlevel% :process_pkg_config set "pc_args=%_arg%" if defined PKG_CONFIG goto pkg_config_defined echo.*** WARNING -- the pkg-config program is unavailable but is needed to get C compiler options using 'pkg-config --cflags %pc_args%' and 'pkg-config --libs %pc_args%' exit /b 0 :pkg_config_defined %PKG_CONFIG% --cflags %pc_args% > nul set "_errorlevel=%ERRORLEVEL%" if not "%_errorlevel%" == "0" goto :process_pkg_config_done for /f "delims=" %%i in ('%PKG_CONFIG% --cflags %pc_args%') do ( set "_arg=%%i" call :plain_string_decode call :accumulate_cc_options ) if not "%_errorlevel%" == "0" goto :process_pkg_config_done %PKG_CONFIG% --libs %pc_args% > nul set "_errorlevel=%ERRORLEVEL%" for /f "delims=" %%i in ('%PKG_CONFIG% --libs %pc_args%') do ( set "_arg=%%i" call :plain_string_decode call :accumulate_ld_options ) :process_pkg_config_done exit /b %_errorlevel% :process_cc_ld_options_from_files set "for_each_meta_info_of_file_file=%_arg%" set "for_each_meta_info_of_file_key=cc-options" set "for_each_meta_info_of_file_handle=:process_cc_options" call :for_each_meta_info_of_file set "for_each_meta_info_of_file_key=ld-options-prelude" set "for_each_meta_info_of_file_handle=:process_ld_options_prelude" call :for_each_meta_info_of_file set "for_each_meta_info_of_file_key=ld-options" set "for_each_meta_info_of_file_handle=:process_ld_options" call :for_each_meta_info_of_file exit /b %_errorlevel% :process_cc_options call :plain_string_decode call :accumulate_cc_options exit /b %_errorlevel% :process_ld_options_prelude call :plain_string_decode call :accumulate_ld_options_prelude exit /b %_errorlevel% :process_ld_options call :plain_string_decode call :accumulate_ld_options exit /b %_errorlevel% :accumulate_pkg_config_path if defined GAMBUILD_PKG_CONFIG_PATH ( rem prepend path so that last path added has priority set "GAMBUILD_PKG_CONFIG_PATH=!_arg!;!GAMBUILD_PKG_CONFIG_PATH!" ) else ( set "GAMBUILD_PKG_CONFIG_PATH=!_arg!" ) exit /b %_errorlevel% :accumulate_cc_options if defined GAMBUILD_CC_OPTIONS ( set "GAMBUILD_CC_OPTIONS=!GAMBUILD_CC_OPTIONS! !_arg!" ) else ( set "GAMBUILD_CC_OPTIONS=!_arg!" ) exit /b %_errorlevel% :accumulate_ld_options_prelude if defined GAMBUILD_LD_OPTIONS_PRELUDE ( set "GAMBUILD_LD_OPTIONS_PRELUDE=!GAMBUILD_LD_OPTIONS_PRELUDE! !_arg!" ) else ( set "GAMBUILD_LD_OPTIONS_PRELUDE=!_arg!" ) exit /b %_errorlevel% :accumulate_ld_options if defined GAMBUILD_LD_OPTIONS ( set "GAMBUILD_LD_OPTIONS=!GAMBUILD_LD_OPTIONS! !_arg!" ) else ( set "GAMBUILD_LD_OPTIONS=!_arg!" ) exit /b %_errorlevel% :accumulate_input_filenames call :plain_string_decode call :simple_string_encode if defined GAMBUILD_INPUT_FILENAMES ( set "GAMBUILD_INPUT_FILENAMES=!GAMBUILD_INPUT_FILENAMES! "!_arg!"" ) else ( set "GAMBUILD_INPUT_FILENAMES="!_arg!"" ) exit /b %_errorlevel% :accumulate_output_filename call :plain_string_decode call :simple_string_encode set "GAMBUILD_OUTPUT_FILENAME=!_arg!" exit /b %_errorlevel% :prepare_params rem ---------------------------------------------------------------------- rem Augment PKG_CONFIG_PATH with the meta information from files in rem META_INFO_FILE_PARAM and the paths in PKG_CONFIG_PATH_PARAM. rem ---------------------------------------------------------------------- set "GAMBUILD_CC_OPTIONS=" set "GAMBUILD_LD_OPTIONS_PRELUDE=" set "GAMBUILD_LD_OPTIONS=" if defined PKG_CONFIG_PATH ( set "_arg=!PKG_CONFIG_PATH!" call :plain_string_decode ) else ( set "_arg=" ) set "GAMBUILD_PKG_CONFIG_PATH=!_arg!" rem Process META_INFO_FILE_PARAM (actual variable name in %1) set "for_each_line_of_var_var=%1" set "for_each_line_of_var_handle=:augment_pkg_config_path_from_files" call :for_each_line_of_var rem Process PKG_CONFIG_PATH_PARAM (actual variable name in %3) set "for_each_line_of_var_var=%3" set "for_each_line_of_var_handle=:augment_pkg_config_path_from_var" call :for_each_line_of_var if not defined GAMBUILD_PKG_CONFIG_PATH goto :done_pkg_config_path set _arg=!GAMBUILD_PKG_CONFIG_PATH! call :simple_string_encode set "PKG_CONFIG_PATH=!_arg!" :done_pkg_config_path rem ---------------------------------------------------------------------- rem Use the meta information from files in META_INFO_FILE_PARAM and rem the package names in PKG_CONFIG_PATH to call pkg-config to rem accumulate C compiler and linker options. rem ---------------------------------------------------------------------- rem Process META_INFO_FILE_PARAM (actual variable name in %1) set "for_each_line_of_var_var=%1" set "for_each_line_of_var_handle=:process_pkg_config_from_files" call :for_each_line_of_var if not "%_errorlevel%" == "0" goto :prepare_params_done rem Process PKG_CONFIG_PARAM (actual variable name in %2) set "for_each_line_of_var_var=%2" set "for_each_line_of_var_handle=:process_pkg_config_from_var" call :for_each_line_of_var if not "%_errorlevel%" == "0" goto :prepare_params_done rem ---------------------------------------------------------------------- rem Use the meta information from files in META_INFO_FILE_PARAM to rem accumulate C compiler and linker options from cc-options, rem ld-options-prelude and ld-options. rem ---------------------------------------------------------------------- rem Process META_INFO_FILE_PARAM (actual variable name in %1) set "for_each_line_of_var_var=%1" set "for_each_line_of_var_handle=:process_cc_ld_options_from_files" call :for_each_line_of_var set "for_each_line_of_var_var=%4" set "for_each_line_of_var_handle=:process_cc_options" call :for_each_line_of_var set "for_each_line_of_var_var=%5" set "for_each_line_of_var_handle=:process_ld_options_prelude" call :for_each_line_of_var set "for_each_line_of_var_var=%6" set "for_each_line_of_var_handle=:process_ld_options" call :for_each_line_of_var set "_arg=!GAMBUILD_CC_OPTIONS!" call :simple_string_encode set "GAMBUILD_CC_OPTIONS=!_arg!" set "_arg=!GAMBUILD_LD_OPTIONS_PRELUDE!" call :simple_string_encode set "GAMBUILD_LD_OPTIONS_PRELUDE=!_arg!" set "_arg=!GAMBUILD_LD_OPTIONS!" call :simple_string_encode set "GAMBUILD_LD_OPTIONS=!_arg!" rem Process INPUT_FILENAMES_PARAM (actual variable name in %4) set "GAMBUILD_INPUT_FILENAMES=" set "for_each_line_of_var_var=%7" set "for_each_line_of_var_handle=:accumulate_input_filenames" call :for_each_line_of_var rem Process OUTPUT_FILENAME_PARAM (actual variable name in %5) set "GAMBUILD_OUTPUT_FILENAME=" set "for_each_line_of_var_var=%8" set "for_each_line_of_var_handle=:accumulate_output_filename" call :for_each_line_of_var :prepare_params_done exit /b %_errorlevel% :select_operation if "%1" == "obj" goto obj if not "%1" == ""obj"" goto not_obj :obj if not defined BUILD_OBJ_CC_PARAM goto :obj_cc_done set "C_COMPILER=!BUILD_OBJ_CC_PARAM!" set "FLAGS_OBJ= " :obj_cc_done set "BUILD_OBJ_LD_OPTIONS_PRELUDE_PARAM= " set "BUILD_OBJ_LD_OPTIONS_PARAM= " call :prepare_params BUILD_OBJ_META_INFO_FILE_PARAM BUILD_OBJ_PKG_CONFIG_PARAM BUILD_OBJ_PKG_CONFIG_PATH_PARAM BUILD_OBJ_CC_OPTIONS_PARAM BUILD_OBJ_LD_OPTIONS_PRELUDE_PARAM BUILD_OBJ_LD_OPTIONS_PARAM BUILD_OBJ_INPUT_FILENAMES_PARAM BUILD_OBJ_OUTPUT_FILENAME_PARAM if not "%_errorlevel%" == "0" goto :end set "BUILD_OBJ_CC_OPTIONS_PARAM=!GAMBUILD_CC_OPTIONS!" set "BUILD_OBJ_INPUT_FILENAMES_PARAM=!GAMBUILD_INPUT_FILENAMES!" set "BUILD_OBJ_OUTPUT_FILENAME_PARAM=!GAMBUILD_OUTPUT_FILENAME!" set "_shell_command=@BUILD_OBJ_ECHO_BAT@" call :eval_shell_command goto end :not_obj if "%1" == "dyn" goto dyn if not "%1" == ""dyn"" goto not_dyn :dyn if not defined BUILD_DYN_CC_PARAM goto :dyn_cc_done set "C_COMPILER=!BUILD_DYN_CC_PARAM!" set "FLAGS_DYN= " :dyn_cc_done call :prepare_params BUILD_DYN_META_INFO_FILE_PARAM BUILD_DYN_PKG_CONFIG_PARAM BUILD_DYN_PKG_CONFIG_PATH_PARAM BUILD_DYN_CC_OPTIONS_PARAM BUILD_DYN_LD_OPTIONS_PRELUDE_PARAM BUILD_DYN_LD_OPTIONS_PARAM BUILD_DYN_INPUT_FILENAMES_PARAM BUILD_DYN_OUTPUT_FILENAME_PARAM if not "%_errorlevel%" == "0" goto :end set "BUILD_DYN_CC_OPTIONS_PARAM=!GAMBUILD_CC_OPTIONS!" set "BUILD_DYN_LD_OPTIONS_PRELUDE_PARAM=!GAMBUILD_LD_OPTIONS_PRELUDE!" set "BUILD_DYN_LD_OPTIONS_PARAM=!GAMBUILD_LD_OPTIONS!" set "BUILD_DYN_INPUT_FILENAMES_PARAM=!GAMBUILD_INPUT_FILENAMES!" set "BUILD_DYN_OUTPUT_FILENAME_PARAM=!GAMBUILD_OUTPUT_FILENAME!" set "_shell_command=@BUILD_DYN_ECHO_BAT@" call :eval_shell_command goto end :not_dyn if "%1" == "lib" goto lib if not "%1" == ""lib"" goto not_lib :lib if not defined BUILD_LIB_CC_PARAM goto :lib_cc_done set "C_COMPILER=!BUILD_LIB_CC_PARAM!" set "FLAGS_LIB= " :lib_cc_done set "_shell_command=@BUILD_LIB_ECHO_BAT@" call :eval_shell_command goto end :not_lib if "%1" == "exe" goto exe if not "%1" == ""exe"" goto not_exe :exe if not defined BUILD_EXE_CC_PARAM goto :exe_cc_done set "C_COMPILER=!BUILD_EXE_CC_PARAM!" set "FLAGS_EXE= " :exe_cc_done call :prepare_params BUILD_EXE_META_INFO_FILE_PARAM BUILD_EXE_PKG_CONFIG_PARAM BUILD_EXE_PKG_CONFIG_PATH_PARAM BUILD_EXE_CC_OPTIONS_PARAM BUILD_EXE_LD_OPTIONS_PRELUDE_PARAM BUILD_EXE_LD_OPTIONS_PARAM BUILD_EXE_INPUT_FILENAMES_PARAM BUILD_EXE_OUTPUT_FILENAME_PARAM if not "%_errorlevel%" == "0" goto :end set "BUILD_EXE_CC_OPTIONS_PARAM=!GAMBUILD_CC_OPTIONS!" set "BUILD_EXE_LD_OPTIONS_PRELUDE_PARAM=!GAMBUILD_LD_OPTIONS_PRELUDE!" set "BUILD_EXE_LD_OPTIONS_PARAM=!GAMBUILD_LD_OPTIONS!" set "BUILD_EXE_INPUT_FILENAMES_PARAM=!GAMBUILD_INPUT_FILENAMES!" set "BUILD_EXE_OUTPUT_FILENAME_PARAM=!GAMBUILD_OUTPUT_FILENAME!" set "_shell_command=@BUILD_EXE_ECHO_BAT@" call :eval_shell_command goto end :not_exe if "%1" == "CORCXXFLAGS_GAMBUILD" goto CORCXXFLAGS_GAMBUILD if not "%1" == ""CORCXXFLAGS_GAMBUILD"" goto not_CORCXXFLAGS_GAMBUILD :CORCXXFLAGS_GAMBUILD echo.%CORCXXFLAGS_GAMBUILD% goto end :not_CORCXXFLAGS_GAMBUILD if "%1" == "LDFLAGS_GAMBUILD" goto LDFLAGS_GAMBUILD if not "%1" == ""LDFLAGS_GAMBUILD"" goto not_LDFLAGS_GAMBUILD :LDFLAGS_GAMBUILD echo.%LDFLAGS_GAMBUILD% goto end :not_LDFLAGS_GAMBUILD if "%1" == "C_COMPILER" goto C_COMPILER if not "%1" == ""C_COMPILER"" goto not_C_COMPILER :C_COMPILER echo.%C_COMPILER% goto end :not_C_COMPILER if "%1" == "C_PREPROC" goto C_PREPROC if not "%1" == ""C_PREPROC"" goto not_C_PREPROC :C_PREPROC echo.%C_PREPROC% goto end :not_C_PREPROC if "%1" == "PKG_CONFIG" goto PKG_CONFIG if not "%1" == ""PKG_CONFIG"" goto not_PKG_CONFIG :PKG_CONFIG echo.%PKG_CONFIG% goto end :not_PKG_CONFIG if "%1" == "FLAGS_OBJ" goto FLAGS_OBJ if not "%1" == ""FLAGS_OBJ"" goto not_FLAGS_OBJ :FLAGS_OBJ echo.%FLAGS_OBJ% goto end :not_FLAGS_OBJ if "%1" == "FLAGS_DYN" goto FLAGS_DYN if not "%1" == ""FLAGS_DYN"" goto not_FLAGS_DYN :FLAGS_DYN echo.%FLAGS_DYN% goto end :not_FLAGS_DYN if "%1" == "FLAGS_LIB" goto FLAGS_LIB if not "%1" == ""FLAGS_LIB"" goto not_FLAGS_LIB :FLAGS_LIB echo.%FLAGS_LIB% goto end :not_FLAGS_LIB if "%1" == "FLAGS_EXE" goto FLAGS_EXE if not "%1" == ""FLAGS_EXE"" goto not_FLAGS_EXE :FLAGS_EXE echo.%FLAGS_EXE% goto end :not_FLAGS_EXE if "%1" == "FLAGS_OPT" goto FLAGS_OPT if not "%1" == ""FLAGS_OPT"" goto not_FLAGS_OPT :FLAGS_OPT echo.%FLAGS_OPT% goto end :not_FLAGS_OPT if "%1" == "FLAGS_OPT_RTS" goto FLAGS_OPT_RTS if not "%1" == ""FLAGS_OPT_RTS"" goto not_FLAGS_OPT_RTS :FLAGS_OPT_RTS echo.%FLAGS_OPT_RTS% goto end :not_FLAGS_OPT_RTS if "%1" == "DEFS_OBJ" goto DEFS_OBJ if not "%1" == ""DEFS_OBJ"" goto not_DEFS_OBJ :DEFS_OBJ echo.%DEFS_OBJ% goto end :not_DEFS_OBJ if "%1" == "DEFS_DYN" goto DEFS_DYN if not "%1" == ""DEFS_DYN"" goto not_DEFS_DYN :DEFS_DYN echo.%DEFS_DYN% goto end :not_DEFS_DYN if "%1" == "DEFS_LIB" goto DEFS_LIB if not "%1" == ""DEFS_LIB"" goto not_DEFS_LIB :DEFS_LIB echo.%DEFS_LIB% goto end :not_DEFS_LIB if "%1" == "DEFS_EXE" goto DEFS_EXE if not "%1" == ""DEFS_EXE"" goto not_DEFS_EXE :DEFS_EXE echo.%DEFS_EXE% goto end :not_DEFS_EXE if "%1" == "BUILD_OBJ" goto BUILD_OBJ if not "%1" == ""BUILD_OBJ"" goto not_BUILD_OBJ :BUILD_OBJ echo.%BUILD_OBJ% goto end :not_BUILD_OBJ if "%1" == "BUILD_DYN" goto BUILD_DYN if not "%1" == ""BUILD_DYN"" goto not_BUILD_DYN :BUILD_DYN echo.%BUILD_DYN% goto end :not_BUILD_DYN if "%1" == "BUILD_LIB" goto BUILD_LIB if not "%1" == ""BUILD_LIB"" goto not_BUILD_LIB :BUILD_LIB echo.%BUILD_LIB% goto end :not_BUILD_LIB if "%1" == "BUILD_EXE" goto BUILD_EXE if not "%1" == ""BUILD_EXE"" goto not_BUILD_EXE :BUILD_EXE echo.%BUILD_EXE% goto end :not_BUILD_EXE if "%1" == "DEFS" goto DEFS if not "%1" == ""DEFS"" goto not_DEFS :DEFS echo.%DEFS% goto end :not_DEFS if "%1" == "LIBS" goto LIBS if not "%1" == ""LIBS"" goto not_LIBS :LIBS echo.%LIBS% goto end :not_LIBS if "%1" == "GAMBITLIB_DEFS" goto GAMBITLIB_DEFS if not "%1" == ""GAMBITLIB_DEFS"" goto not_GAMBITLIB_DEFS :GAMBITLIB_DEFS echo.%GAMBITLIB_DEFS% goto end :not_GAMBITLIB_DEFS if "%1" == "GAMBITLIB" goto GAMBITLIB if not "%1" == ""GAMBITLIB"" goto not_GAMBITLIB :GAMBITLIB echo.%GAMBITLIB% goto end :not_GAMBITLIB if "%1" == "GAMBITGSCLIB" goto GAMBITGSCLIB if not "%1" == ""GAMBITGSCLIB"" goto not_GAMBITGSCLIB :GAMBITGSCLIB echo.%GAMBITGSCLIB% goto end :not_GAMBITGSCLIB if "%1" == "GAMBITGSILIB" goto GAMBITGSILIB if not "%1" == ""GAMBITGSILIB"" goto not_GAMBITGSILIB :GAMBITGSILIB echo.%GAMBITGSILIB% goto end :not_GAMBITGSILIB if "%1" == "LIB_PREFIX" goto LIB_PREFIX if not "%1" == ""LIB_PREFIX"" goto not_LIB_PREFIX :LIB_PREFIX echo.%LIB_PREFIX% goto end :not_LIB_PREFIX if "%1" == "LIB_EXTENSION" goto LIB_EXTENSION if not "%1" == ""LIB_EXTENSION"" goto not_LIB_EXTENSION :LIB_EXTENSION echo.%LIB_EXTENSION% goto end :not_LIB_EXTENSION if "%1" == "OBJ_EXTENSION" goto OBJ_EXTENSION if not "%1" == ""OBJ_EXTENSION"" goto not_OBJ_EXTENSION :OBJ_EXTENSION echo.%OBJ_EXTENSION% goto end :not_OBJ_EXTENSION if "%1" == "EXE_EXTENSION" goto EXE_EXTENSION if not "%1" == ""EXE_EXTENSION"" goto not_EXE_EXTENSION :EXE_EXTENSION echo.%EXE_EXTENSION% goto end :not_EXE_EXTENSION if "%1" == "BAT_EXTENSION" goto BAT_EXTENSION if not "%1" == ""BAT_EXTENSION"" goto not_BAT_EXTENSION :BAT_EXTENSION echo.%BAT_EXTENSION% goto end :not_BAT_EXTENSION echo.gambuild-C.bat unknown operation "%1" exit /b 1 :end exit /b 0