diff options
| author | Eugen Wissner <belka@caraus.de> | 2026-10-12 22:25:46 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2026-10-12 22:25:46 +0200 |
| commit | de6ecae0f072bb32be95382c536a517eabe4b1f1 (patch) | |
| tree | 2a337dea0f9b124da9436c16e80b7d8f3f8000fb /rakelib | |
| parent | da1e84e33de1a9c2cc1745b8f42bc7f0cee8fc5c (diff) | |
| download | elna-cpp.tar.gz | |
Diffstat (limited to 'rakelib')
| -rw-r--r-- | rakelib/compiler.rake | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/rakelib/compiler.rake b/rakelib/compiler.rake index 4731e1d..5cd19d5 100644 --- a/rakelib/compiler.rake +++ b/rakelib/compiler.rake @@ -9,11 +9,11 @@ require 'rake/clean' CLEAN.include 'build/gcc' Rake.application.add_loader('d', Rake::MakefileLoader.new) -FileList['build/gcc/**/*.d'].each { |file| import file } +FileList['build/gcc/obj/**/*.d'].each { |file| import file } -rule(%r{gcc/.+\.o$} => lambda { |file| +rule(%r{gcc/obj/.+\.o$} => lambda { |file| source = Pathname.new('source') + - Pathname.new(file).relative_path_from('build/gcc').sub_ext('.elna') + Pathname.new(file).relative_path_from('build/gcc/obj').sub_ext('.elna') [source, 'build/host/install/bin/gelna'] }) do |t| @@ -23,9 +23,11 @@ rule(%r{gcc/.+\.o$} => lambda { |file| end sources = FileList['source/**/*.elna'].select { |file| file == file.downcase } -file 'build/gcc/elna' => sources.map { |file| - Pathname.new('build/gcc') + +file 'build/gcc/bin/elna' => sources.map { |file| + Pathname.new('build/gcc/obj') + Pathname.new(file).relative_path_from('source').sub_ext('.o') } do |t| + Pathname.new(t.name).dirname.mkpath + sh 'build/host/install/bin/gcc', '-o', t.name, *t.prerequisites end |
