#! /usr/bin/env python
from __future__ import print_function
from __future__ import unicode_literals

import sys

import configargparse
import ct.configutils
import ct.makefile


if __name__ == '__main__':
	# Example: for samples/numbers/ to create the executable (test_library) 
	# that links against libget_numbers
	# ct-create-makefile test_library.cpp --static get_numbers.cpp get_double.cpp get_int.cpp 
	
    variant = ct.configutils.extract_variant()
    config_files = ct.configutils.config_files_from_variant()
    cap = configargparse.getArgumentParser(
        description='Create a Makefile that will compile the given source file into an '
                    'executable (or library). Each given file is assumed to be compiled '
                    'into a separate executable and/or library.',
        formatter_class=configargparse.ArgumentDefaultsHelpFormatter,
        auto_env_var_prefix='',
        default_config_files=config_files,
        args_for_setting_config_path=["-c","--config"],
        ignore_unknown_config_file_keys=True)
    sys.exit(ct.makefile.main())
