paper_house 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +19 -0
- data/.rspec +1 -0
- data/.travis.yml +17 -0
- data/Gemfile +35 -0
- data/Guardfile +28 -0
- data/README.md +116 -0
- data/Rakefile +139 -0
- data/cucumber.yml +3 -0
- data/examples/c_extension/.gitignore +5 -0
- data/examples/c_extension/Rakefile +3 -0
- data/examples/c_extension/Rakefile.llvm +5 -0
- data/examples/c_extension/hello.c +6 -0
- data/examples/executable/.gitignore +4 -0
- data/examples/executable/Rakefile +3 -0
- data/examples/executable/Rakefile.llvm +5 -0
- data/examples/executable/hello.c +7 -0
- data/examples/executable_subdirs/.gitignore +4 -0
- data/examples/executable_subdirs/Rakefile +9 -0
- data/examples/executable_subdirs/includes/hello.h +1 -0
- data/examples/executable_subdirs/sources/hello.c +6 -0
- data/examples/executable_subdirs/sources/main.c +8 -0
- data/examples/shared_library/.gitignore +8 -0
- data/examples/shared_library/Rakefile +17 -0
- data/examples/shared_library/Rakefile.llvm +19 -0
- data/examples/shared_library/hello.c +6 -0
- data/examples/shared_library/hello.h +1 -0
- data/examples/shared_library/main.c +7 -0
- data/examples/shared_library/symlinks.rake +7 -0
- data/examples/shared_library_subdirs/.gitignore +8 -0
- data/examples/shared_library_subdirs/Rakefile +27 -0
- data/examples/shared_library_subdirs/includes/hello.h +1 -0
- data/examples/shared_library_subdirs/sources/hello.c +6 -0
- data/examples/shared_library_subdirs/sources/main.c +8 -0
- data/examples/static_library/.gitignore +7 -0
- data/examples/static_library/Rakefile +13 -0
- data/examples/static_library/Rakefile.llvm +14 -0
- data/examples/static_library/hello.c +6 -0
- data/examples/static_library/hello.h +1 -0
- data/examples/static_library/main.c +7 -0
- data/examples/static_library_subdirs/.gitignore +7 -0
- data/examples/static_library_subdirs/Rakefile +17 -0
- data/examples/static_library_subdirs/includes/hello.h +1 -0
- data/examples/static_library_subdirs/sources/hello.c +6 -0
- data/examples/static_library_subdirs/sources/main.c +8 -0
- data/features/c_extension_task.feature +119 -0
- data/features/executable_task.feature +83 -0
- data/features/shared_library_task.feature +209 -0
- data/features/static_library_task.feature +116 -0
- data/features/step_definitions/paper_house_steps.rb +8 -0
- data/features/support/env.rb +41 -0
- data/features/support/hooks.rb +12 -0
- data/lib/paper_house/auto_depends.rb +95 -0
- data/lib/paper_house/build_task.rb +188 -0
- data/lib/paper_house/c_extension_task.rb +95 -0
- data/lib/paper_house/cc_options.rb +81 -0
- data/lib/paper_house/dependency.rb +74 -0
- data/lib/paper_house/executable_task.rb +77 -0
- data/lib/paper_house/library_task.rb +64 -0
- data/lib/paper_house/linker_options.rb +89 -0
- data/lib/paper_house/platform.rb +69 -0
- data/lib/paper_house/safe_popen.rb +50 -0
- data/lib/paper_house/shared_library_task.rb +92 -0
- data/lib/paper_house/static_library_task.rb +65 -0
- data/lib/paper_house/version.rb +30 -0
- data/lib/paper_house.rb +30 -0
- data/paper_house.gemspec +34 -0
- data/spec/paper_house/c_extension_task_spec.rb +59 -0
- data/spec/paper_house/cc_options_spec.rb +59 -0
- data/spec/paper_house/executable_task_spec.rb +49 -0
- data/spec/paper_house/shared_library_task_spec.rb +94 -0
- data/spec/paper_house/static_library_task_spec.rb +61 -0
- data/spec/paper_house/version_spec.rb +31 -0
- data/spec/spec_helper.rb +46 -0
- metadata +161 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 76f6b308698dc77f7b335bc6b0ef88673815a48e
|
4
|
+
data.tar.gz: 64f2969fa8e010f9508d07b268c8492effde8594
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ffba1f28e1c9deb249c5e48cb14bb152103439831367586bf8c4284d04f86c7aab34b615ce09247491689c8989586d7b72c9b899ffda1b52835ec3aaf1e50231
|
7
|
+
data.tar.gz: fe01a0af5f02b5a122bbb2f16aad92f61c862190504e185f3af086bc42522594620b4413c140cb92a430ca1b43d87b2299ff919d7f16846919724de8da30eba1
|
data/.gitignore
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--require spec_helper
|
data/.travis.yml
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
source "https://rubygems.org"
|
2
|
+
|
3
|
+
|
4
|
+
gemspec
|
5
|
+
|
6
|
+
|
7
|
+
group :development do
|
8
|
+
gem "aruba", "~> 0.5.3"
|
9
|
+
gem "coveralls", "~> 0.7.0", :require => false
|
10
|
+
gem "cucumber", "~> 1.3.8"
|
11
|
+
gem "flay", "~> 2.4.0"
|
12
|
+
gem "flog", "~> 4.1.2"
|
13
|
+
gem "guard", "~> 1.8.3"
|
14
|
+
gem "guard-bundler", "~> 1.0.0"
|
15
|
+
gem "guard-cucumber", "~> 1.4.0"
|
16
|
+
gem "guard-rspec", "~> 3.1.0"
|
17
|
+
gem "rb-fchange", "~> 0.0.6", :require => false
|
18
|
+
gem "rb-fsevent", "~> 0.9.3", :require => false
|
19
|
+
gem "rb-inotify", "~> 0.9.2", :require => false
|
20
|
+
gem "redcarpet", "~> 2.3.0" if RUBY_VERSION < "1.9.0"
|
21
|
+
gem "redcarpet", "~> 3.0.0" if RUBY_VERSION >= "1.9.0"
|
22
|
+
gem "reek", "~> 1.3.3"
|
23
|
+
gem "relish", "~> 0.7"
|
24
|
+
gem "rspec", "~> 2.14.1"
|
25
|
+
gem "rspec-instafail", "~> 0.2.4"
|
26
|
+
gem "terminal-notifier-guard", "~> 1.5.3"
|
27
|
+
gem "yard", "~> 0.8.7.2"
|
28
|
+
end
|
29
|
+
|
30
|
+
|
31
|
+
### Local variables:
|
32
|
+
### mode: Ruby
|
33
|
+
### coding: utf-8-unix
|
34
|
+
### indent-tabs-mode: nil
|
35
|
+
### End:
|
data/Guardfile
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# More info at https://github.com/guard/guard#readme
|
2
|
+
|
3
|
+
notification :terminal_notifier
|
4
|
+
notification :tmux, :display_message => true
|
5
|
+
|
6
|
+
|
7
|
+
guard :bundler do
|
8
|
+
watch('Gemfile')
|
9
|
+
watch(/^.+\.gemspec/)
|
10
|
+
end
|
11
|
+
|
12
|
+
|
13
|
+
guard :rspec, :cli => "--color -r rspec/instafail -f RSpec::Instafail", :all_on_start => false do
|
14
|
+
watch(%r{^spec/paper_house/.+_spec\.rb$})
|
15
|
+
watch(%r{^lib/paper_house/(.+)\.rb$}) { |m| "spec/paper_house/#{m[1]}_spec.rb" }
|
16
|
+
watch('spec/spec_helper.rb') { "spec" }
|
17
|
+
end
|
18
|
+
|
19
|
+
|
20
|
+
require "paper_house/platform"
|
21
|
+
|
22
|
+
cli_opts = %w(--format progress --strict --profile) + [ PaperHouse::Platform::MAC ? "mac" : "linux" ]
|
23
|
+
|
24
|
+
guard :cucumber, :cli => cli_opts.join( " " ), :all_on_start => false do
|
25
|
+
watch(%r{^features/.+\.feature$})
|
26
|
+
watch(%r{^features/support/.+$}) { 'features' }
|
27
|
+
watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'features' }
|
28
|
+
end
|
data/README.md
ADDED
@@ -0,0 +1,116 @@
|
|
1
|
+
Paper House
|
2
|
+
===========
|
3
|
+
[](http://badge.fury.io/rb/paper-house)
|
4
|
+
[](https://travis-ci.org/trema/paper-house)
|
5
|
+
[](https://codeclimate.com/github/trema/paper-house)
|
6
|
+
[](https://coveralls.io/r/trema/paper-house)
|
7
|
+
[](https://gemnasium.com/trema/paper-house)
|
8
|
+
|
9
|
+
<a href="http://www.flickr.com/photos/studiobeerhorst/8221979536/" title="paper houses - 3d woodcut prints by Rick&Brenda Beerhorst, on Flickr"><img src="http://farm9.staticflickr.com/8202/8221979536_60404c309d_n.jpg" width="320" height="240" alt="paper houses - 3d woodcut prints" align="right"></a>
|
10
|
+
|
11
|
+
Paper House is a ruby gem to easily build C projects using [Rake](https://github.com/jimweirich/rake). It supports the following build targets:
|
12
|
+
|
13
|
+
* [Executable](http://rubydoc.info/github/trema/paper-house/PaperHouse/ExecutableTask)
|
14
|
+
* [Static library](http://rubydoc.info/github/trema/paper-house/PaperHouse/StaticLibraryTask)
|
15
|
+
* [Shared library](http://rubydoc.info/github/trema/paper-house/PaperHouse/SharedLibraryTask)
|
16
|
+
* [C extension for Ruby](http://rubydoc.info/github/trema/paper-house/PaperHouse/CExtensionTask)
|
17
|
+
|
18
|
+
|
19
|
+
Features Overview
|
20
|
+
-----------------
|
21
|
+
|
22
|
+
* Provides a simple yet a powerful syntax to build above mentioned
|
23
|
+
targets using predefined Rake tasks.
|
24
|
+
* Pure Ruby. No additional dependency on other external tools
|
25
|
+
(`makedepend` etc.) to resolve file dependencies.
|
26
|
+
* Multi-Platform. Runs on both Linux and MacOSX, and supports all
|
27
|
+
major version of Ruby (1.8.7, 1.9.3, 2.0.0).
|
28
|
+
|
29
|
+
|
30
|
+
Example
|
31
|
+
-------
|
32
|
+
|
33
|
+
Its usage is dead simple: to build an executable from all the `*.c`
|
34
|
+
and `*.h` files in the current directory, just add the following lines
|
35
|
+
to your `Rakefile`.
|
36
|
+
|
37
|
+
```ruby
|
38
|
+
require "paper_house"
|
39
|
+
|
40
|
+
PaperHouse::ExecutableTask.new :hello
|
41
|
+
```
|
42
|
+
|
43
|
+
This defines a new task `hello`, and `rake hello` will automatically
|
44
|
+
analyze all file dependencies of the source files, compile them into
|
45
|
+
an executable named `hello``.
|
46
|
+
|
47
|
+
If you wish to customize the build process more, please set the
|
48
|
+
following options defined in `PaperHouse::ExecutableTask`:
|
49
|
+
|
50
|
+
```ruby
|
51
|
+
PaperHouse::ExecutableTask.new :hello do | task |
|
52
|
+
task.executable_name = "hello_world"
|
53
|
+
task.target_directory = "objects"
|
54
|
+
task.cc = "llvm-gcc"
|
55
|
+
task.includes = "includes"
|
56
|
+
task.sources = "sources"
|
57
|
+
task.cflags = [ "-Werror", "-Wall", "-Wextra" ]
|
58
|
+
task.ldflags = "-L/some/path"
|
59
|
+
task.library_dependencies = "m"
|
60
|
+
end
|
61
|
+
```
|
62
|
+
|
63
|
+
You can find more examples in the
|
64
|
+
[examples/](https://github.com/trema/paper-house/tree/master/examples)
|
65
|
+
directory.
|
66
|
+
|
67
|
+
|
68
|
+
Installation
|
69
|
+
------------
|
70
|
+
|
71
|
+
The simplest way to install Paper House is to use [Bundler](http://gembundler.com/).
|
72
|
+
|
73
|
+
Add Paper House to your `Gemfile`:
|
74
|
+
|
75
|
+
```ruby
|
76
|
+
gem 'paper_house'
|
77
|
+
```
|
78
|
+
|
79
|
+
and install it by running Bundler:
|
80
|
+
|
81
|
+
```bash
|
82
|
+
$ bundle
|
83
|
+
```
|
84
|
+
|
85
|
+
|
86
|
+
Documents
|
87
|
+
---------
|
88
|
+
|
89
|
+
* [API document generated with YARD](http://rubydoc.info/github/trema/paper-house/frames/file/README.md)
|
90
|
+
* [Usage document generated with Cucumber and Relish](https://www.relishapp.com/trema/paper-house/docs)
|
91
|
+
|
92
|
+
|
93
|
+
### Author
|
94
|
+
|
95
|
+
[Yasuhito Takamiya](https://github.com/yasuhito) ([@yasuhito](http://twitter.com/yasuhito))
|
96
|
+
|
97
|
+
### Contributors
|
98
|
+
|
99
|
+
[https://github.com/trema/paper-house/contributors](https://github.com/trema/paper-house/contributors)
|
100
|
+
|
101
|
+
|
102
|
+
Alternatives
|
103
|
+
------------
|
104
|
+
|
105
|
+
* rake-compiler: https://github.com/luislavena/rake-compiler
|
106
|
+
* rake-builder: https://github.com/joeyates/rake-builder
|
107
|
+
* Rant: http://rant.rubyforge.org/
|
108
|
+
* cxxproject: https://github.com/marcmo/cxxproject
|
109
|
+
|
110
|
+
|
111
|
+
License
|
112
|
+
-------
|
113
|
+
|
114
|
+
Trema is released under the GNU General Public License version 3.0:
|
115
|
+
|
116
|
+
* http://www.gnu.org/licenses/gpl.html
|
data/Rakefile
ADDED
@@ -0,0 +1,139 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2013 NEC Corporation
|
3
|
+
#
|
4
|
+
# This program is free software; you can redistribute it and/or modify
|
5
|
+
# it under the terms of the GNU General Public License, version 3, as
|
6
|
+
# published by the Free Software Foundation.
|
7
|
+
#
|
8
|
+
# This program is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
+
# GNU General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU General Public License along
|
14
|
+
# with this program; if not, write to the Free Software Foundation, Inc.,
|
15
|
+
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
16
|
+
#
|
17
|
+
|
18
|
+
|
19
|
+
require "bundler/gem_tasks"
|
20
|
+
require "coveralls/rake/task"
|
21
|
+
require "flay"
|
22
|
+
require "flay_task"
|
23
|
+
require "flog"
|
24
|
+
require "rake/tasklib"
|
25
|
+
require "reek/rake/task"
|
26
|
+
require "rspec/core"
|
27
|
+
require "rspec/core/rake_task"
|
28
|
+
require "yaml"
|
29
|
+
require "yard"
|
30
|
+
|
31
|
+
|
32
|
+
$ruby_source = FileList[ "lib/**/*.rb" ]
|
33
|
+
|
34
|
+
|
35
|
+
task :default => :travis
|
36
|
+
task :travis => [ :spec, :cucumber, :quality, "coveralls:push" ]
|
37
|
+
task :quality => [ :reek, :flog, :flay ]
|
38
|
+
|
39
|
+
|
40
|
+
Coveralls::RakeTask.new
|
41
|
+
|
42
|
+
|
43
|
+
RSpec::Core::RakeTask.new do | task |
|
44
|
+
task.rspec_opts = "--format documentation --color"
|
45
|
+
end
|
46
|
+
|
47
|
+
|
48
|
+
require "cucumber/rake/task"
|
49
|
+
Cucumber::Rake::Task.new do | t |
|
50
|
+
profile = %w(--profile)
|
51
|
+
require "paper_house/platform"
|
52
|
+
if PaperHouse::Platform::MAC
|
53
|
+
profile << "mac"
|
54
|
+
else
|
55
|
+
profile << "linux"
|
56
|
+
end
|
57
|
+
t.cucumber_opts = profile.join( " " )
|
58
|
+
end
|
59
|
+
|
60
|
+
|
61
|
+
Reek::Rake::Task.new do | t |
|
62
|
+
t.fail_on_error = true
|
63
|
+
t.verbose = false
|
64
|
+
t.ruby_opts = [ "-rubygems" ]
|
65
|
+
t.reek_opts = "--quiet"
|
66
|
+
t.source_files = $ruby_source
|
67
|
+
end
|
68
|
+
|
69
|
+
|
70
|
+
desc "Analyze for code complexity"
|
71
|
+
task :flog do
|
72
|
+
flog = Flog.new( :continue => true )
|
73
|
+
flog.flog( *$ruby_source )
|
74
|
+
threshold = 10
|
75
|
+
|
76
|
+
bad_methods = flog.totals.select do | name, score |
|
77
|
+
( not ( /##{flog.no_method}$/=~ name ) ) and score > threshold
|
78
|
+
end
|
79
|
+
bad_methods.sort do | a, b |
|
80
|
+
a[ 1 ] <=> b[ 1 ]
|
81
|
+
end.reverse.each do | name, score |
|
82
|
+
puts "%8.1f: %s" % [ score, name ]
|
83
|
+
end
|
84
|
+
unless bad_methods.empty?
|
85
|
+
raise "#{ bad_methods.size } methods have a flog complexity > #{ threshold }"
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
|
90
|
+
FlayTask.new do | t |
|
91
|
+
t.dirs = $ruby_source.collect do | each |
|
92
|
+
each[ /[^\/]+/ ]
|
93
|
+
end.uniq
|
94
|
+
t.threshold = 0
|
95
|
+
t.verbose = $trace
|
96
|
+
end
|
97
|
+
|
98
|
+
|
99
|
+
task :relish do
|
100
|
+
sh "relish push trema/paper-house"
|
101
|
+
end
|
102
|
+
|
103
|
+
|
104
|
+
YARD::Rake::YardocTask.new do | t |
|
105
|
+
t.options = [ "--no-private" ]
|
106
|
+
t.options << "--debug" << "--verbose" if $trace
|
107
|
+
end
|
108
|
+
|
109
|
+
|
110
|
+
def travis_yml
|
111
|
+
File.join File.dirname( __FILE__ ), ".travis.yml"
|
112
|
+
end
|
113
|
+
|
114
|
+
|
115
|
+
def rubies
|
116
|
+
( [ "1.8.7" ] + YAML.load_file( travis_yml )[ "rvm" ] ).uniq.sort
|
117
|
+
end
|
118
|
+
|
119
|
+
|
120
|
+
desc "Run tests against multiple rubies"
|
121
|
+
task :portability
|
122
|
+
|
123
|
+
rubies.each do | each |
|
124
|
+
portability_task_name = "portability:#{ each }"
|
125
|
+
task :portability => portability_task_name
|
126
|
+
|
127
|
+
desc "Run tests against Ruby#{ each }"
|
128
|
+
task portability_task_name do
|
129
|
+
sh "rvm #{ each } exec bundle"
|
130
|
+
sh "rvm #{ each } exec bundle exec rake"
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
|
135
|
+
### Local variables:
|
136
|
+
### mode: Ruby
|
137
|
+
### coding: utf-8-unix
|
138
|
+
### indent-tabs-mode: nil
|
139
|
+
### End:
|
data/cucumber.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
void print_hello();
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require "paper_house"
|
2
|
+
|
3
|
+
$libhello = PaperHouse::SharedLibraryTask.new :libhello do | task |
|
4
|
+
task.version = "0.1.0"
|
5
|
+
task.sources = "hello.c"
|
6
|
+
task.library_dependencies = "m" # not used.
|
7
|
+
end
|
8
|
+
|
9
|
+
|
10
|
+
task :hello => [ :libhello, $libhello.linker_name, $libhello.soname ]
|
11
|
+
|
12
|
+
PaperHouse::ExecutableTask.new :hello do | task |
|
13
|
+
task.sources = "main.c"
|
14
|
+
task.ldflags = "-L."
|
15
|
+
end
|
16
|
+
|
17
|
+
load "symlinks.rake"
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require "paper_house"
|
2
|
+
|
3
|
+
$libhello = PaperHouse::SharedLibraryTask.new :libhello do | task |
|
4
|
+
task.version = "0.1.0"
|
5
|
+
task.sources = "hello.c"
|
6
|
+
task.cc = "llvm-gcc"
|
7
|
+
task.library_dependencies = "m" # not used.
|
8
|
+
end
|
9
|
+
|
10
|
+
|
11
|
+
task :hello => [ :libhello, $libhello.linker_name, $libhello.soname ]
|
12
|
+
|
13
|
+
PaperHouse::ExecutableTask.new :hello do | task |
|
14
|
+
task.sources = "main.c"
|
15
|
+
task.cc = "llvm-gcc"
|
16
|
+
task.ldflags = "-L."
|
17
|
+
end
|
18
|
+
|
19
|
+
load "symlinks.rake"
|
@@ -0,0 +1 @@
|
|
1
|
+
void hello();
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require "paper_house"
|
2
|
+
|
3
|
+
libhello = PaperHouse::SharedLibraryTask.new :libhello do | task |
|
4
|
+
task.library_name = "hello"
|
5
|
+
task.version = "0.1.0"
|
6
|
+
task.target_directory = "objects"
|
7
|
+
task.sources = "sources/hello.c"
|
8
|
+
task.includes = "includes"
|
9
|
+
task.cflags = [ "-Werror", "-Wall", "-Wextra" ]
|
10
|
+
end
|
11
|
+
|
12
|
+
|
13
|
+
task :hello => [ :libhello, libhello.linker_name, libhello.soname ]
|
14
|
+
|
15
|
+
PaperHouse::ExecutableTask.new :hello do | task |
|
16
|
+
task.sources = "sources/main.c"
|
17
|
+
task.includes = "includes"
|
18
|
+
task.ldflags = "-L."
|
19
|
+
end
|
20
|
+
|
21
|
+
[ libhello.linker_name, libhello.soname ].each do | each |
|
22
|
+
file each do | task |
|
23
|
+
symlink File.join( "objects", libhello.target_file_name ), task.name
|
24
|
+
end
|
25
|
+
|
26
|
+
CLOBBER.include each if FileTest.exists?( each )
|
27
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
void print_hello();
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require "paper_house"
|
2
|
+
|
3
|
+
task :hello => :libhello
|
4
|
+
|
5
|
+
PaperHouse::StaticLibraryTask.new :libhello do | task |
|
6
|
+
task.sources = "hello.c"
|
7
|
+
end
|
8
|
+
|
9
|
+
|
10
|
+
PaperHouse::ExecutableTask.new :hello do | task |
|
11
|
+
task.ldflags = "-L."
|
12
|
+
task.sources = "main.c"
|
13
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require "paper_house"
|
2
|
+
|
3
|
+
task :hello => :libhello
|
4
|
+
|
5
|
+
PaperHouse::StaticLibraryTask.new :libhello do | task |
|
6
|
+
task.cc = "llvm-gcc"
|
7
|
+
task.sources = "hello.c"
|
8
|
+
end
|
9
|
+
|
10
|
+
PaperHouse::ExecutableTask.new :hello do | task |
|
11
|
+
task.cc = "llvm-gcc"
|
12
|
+
task.ldflags = "-L."
|
13
|
+
task.sources = "main.c"
|
14
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
void hello();
|