From ced80d2b4b1ed4ef0752a8bbaf0dbfe7aa6c6a95 Mon Sep 17 00:00:00 2001 From: Yuichiro MASUI Date: Sun, 20 Jan 2013 22:48:42 +0900 Subject: Improved build scripts and config files --- tasks/toolchains/gcc.rake | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tasks/toolchains/gcc.rake (limited to 'tasks/toolchains/gcc.rake') diff --git a/tasks/toolchains/gcc.rake b/tasks/toolchains/gcc.rake new file mode 100644 index 000000000..c624c8fc9 --- /dev/null +++ b/tasks/toolchains/gcc.rake @@ -0,0 +1,21 @@ +MRuby::Toolchain.new(:gcc) do |conf| + conf.cc do |cc| + cc.command = ENV['CC'] || 'gcc' + cc.flags = [ENV['CFLAGS'] || %w(-g -O3 -Wall -Werror-implicit-function-declaration)] + cc.include_paths = ["#{root}/include"] + cc.defines = %w(DISABLE_GEMS) + cc.option_include_path = '-I%s' + cc.option_define = '-D%s' + cc.compile_options = '%{flags} -MMD -o %{outfile} -c %{infile}' + end + + conf.linker do |linker| + linker.command = ENV['LD'] || 'gcc' + linker.flags = [ENV['LDFLAGS'] || %w()] + linker.libraries = %w(m) + linker.library_paths = [] + linker.option_library = '-l%s' + linker.option_library_path = '-L%s' + linker.link_options = '%{flags} -o %{outfile} %{objs} %{libs}' + end +end -- cgit v1.2.3