// disable code inlining when building static libs
InlineCode = "no"

// include common options
include "MySQL-Opt.icc"
include "MySQL-Source.icc"

option ProjectOptions = MySQLOptions
                      , link(defaultlibsname, "mysql.lib")
{

   option file(genobject, "..\\OBJ\\ZLIB\\")
          ,link(exportAll)
   {
      target "..\\bin\\mysqlu.dll"
      {
         // optimized precompiled headers
         option macros('global', 'yes')
         {
            source type('cpp') client_global_pch
         }
         // target source files
         source zlib, ufc, regex, 'strings\bmove_upp.c'
         if debug_build  {
            source type('cpp') dbug
         }
         source type('cpp') heap
         source type('cpp') myisam
         source type('cpp') myisammrg
         source type('cpp') my_sys
         source type('cpp') my_sys_cli
         source type('cpp') my_sys_sql
         source type('cpp') strings
         source type('cpp') '..\libmysql\dll.c'
         source BldLevelInfo
      }
   }


      target "..\\bin\\myisamchk.exe"
      {
         // optimized precompiled headers
         option macros('global', 'yes')
         {
            source type('cpp') client_global_pch
         }
         // target source files
         source type('cpp') "..\\myisam\\myisamchk.c",
                            "..\\myisam\\mi_check.c",
                            "..\\myisam\\sort.c"
         source BldLevelInfo
      }

      target "..\\bin\\myisamlog.exe"
      {
         // optimized precompiled headers
         option macros('global', 'yes')
         {
            source type('cpp') client_global_pch
         }
         // target source files
         source type('cpp') "..\\myisam\\myisamlog.c"
         source BldLevelInfo
      }

      target "..\\bin\\myisampack.exe"
      {
         // optimized precompiled headers
         option macros('global', 'yes')
         {
            source type('cpp') client_global_pch
         }
         // target source files
         source type('cpp') "..\\myisam\\myisampack.c"
         source BldLevelInfo
      }

      target "..\\bin\\test\\comp_err.exe"
      {
         // target source files
         source type('cpp') "..\\extra\\comp_err.c"
      }

      target "..\\bin\\gen_lex_hash.exe"
      {
         // target source files
         source type('cpp') "..\\sql\\gen_lex_hash.cc"
      }

      target "..\\bin\\test\\mi_test1.exe"
      {
         // target source files
         source type('cpp') "..\\myisam\\mi_test1.c"
      }
      target "..\\bin\\test\\mi_test2.exe"
      {
         // target source files
         source type('cpp') "..\\myisam\\mi_test2.c"
      }
      target "..\\bin\\test\\ft_eval.exe"
      {
         // target source files
         source type('cpp') "..\\myisam\\ft_eval.c"
      }
      target "..\\bin\\test\\ft_test1.exe"
      {
         // target source files
         source type('cpp') "..\\myisam\\ft_test1.c"
      }
/*
      target "..\\bin\\test\\testhash.exe"
      {
         // target source files
         source type('cpp') "..\\mysys\\testhash.c"
      }
*/
      target "..\\bin\\test\\test_charset.exe"
      {
         // target source files
         source type('cpp') "..\\mysys\\test_charset.c"
      }

      target "..\\bin\\test\\hp_test1.exe"
      {
         // target source files
         source type('cpp') "..\\heap\\hp_test1.c"
      }
      target "..\\bin\\test\\hp_test2.exe"
      {
         // target source files
         source type('cpp') "..\\heap\\hp_test2.c"
      }

/*
      option define( "MAIN", "")
      {
         target "..\\bin\\test\\thr_lock.exe"
         {
            // target source files
            source type('cpp') "..\\mysys\\thr_lock.c"
         }
      }
*/

      target "..\\bin\\test\\insert_test.exe"
      {
         // optimized precompiled headers
         option macros('global', 'yes')
         {
            source type('cpp') client_global_pch
         }
         source type('cpp') "..\\client\\insert_test.c"
      }
      target "..\\bin\\test\\select_test.exe"
      {
         source type('cpp') "..\\client\\select_test.c"
      }
      target "..\\bin\\test\\thread_test.exe"
      {
         // optimized precompiled headers
         option macros('global', 'yes')
         {
            source type('cpp') client_global_pch
         }
         source type('cpp') "..\\client\\thread_test.c"
      }

}

run after sources('..\bin\gen_lex_hash.exe') targets('..\sql\lex_hash.h')
          'cd ..\bin & ..\bin\gen_lex_hash.exe > ..\sql\lex_hash.h'
