use strict;
use warnings;

use SPVM::Builder::Config;

my $config = SPVM::Builder::Config->new_c99;

$config->optimize('-O2');

my @source_files = qw(
  foo.c
  bar.c
  baz/baz.c
);
$config->add_source_file(@source_files);

$config->use_resource('TestCase::Resource::Mylib1');
$config->use_resource('TestCase::Resource::Mylib2');

$config->add_before_compile_cb(sub {
  my ($config, $compile_info) = @_;
  
  $main::MYEXE_COMPILE_INFO_BEFORE_COMPILE ||= $compile_info;
});

# Empty strings are allowed.
$config->add_ccflag('');
$config->add_ldflag('');

$config->add_define('SOME_DEFINE');

$config->add_define('SOME_DEFINE_WITH_VALUE=1');

$config;
