Paper House is a ruby gem to easily build C projects using Rake. It supports the following build targets:
- Provides a simple yet a powerful syntax to build above mentioned targets using predefined Rake tasks.
- Pure Ruby. No additional dependency on other external tools (makedepend etc.) to resolve file dependencies.
- Multi-Platform. Runs on both Linux and MacOSX, and supports all major version of Ruby (1.9.3, 2.0.0).
Its usage is dead simple: to build an executable from all the
*.h files in the current directory, just add the following lines
require 'paper_house' PaperHouse::ExecutableTask.new :hello
This defines a new task
rake hello will automatically
analyze all file dependencies of the source files, compile them into
an executable named
If you wish to customize the build process more, please set the following options defined in PaperHouse::ExecutableTask:
PaperHouse::ExecutableTask.new :hello do |task| task.executable_name = 'hello_world' task.target_directory = 'objects' task.cc = 'llvm-gcc' task.includes = 'includes' task.sources = 'sources' task.cflags = %w(-Werror -Wall -Wextra) task.ldflags = '-L/some/path' task.library_dependencies = 'm' end
You can find more examples in the examples/ directory.
The simplest way to install Paper House is to use Bundler.
Add Paper House to your
and install it by running Bundler:
- rake-compiler: https://github.com/luislavena/rake-compiler
- rake-builder: https://github.com/joeyates/rake-builder
- Rant: http://rant.rubyforge.org/
- cxxproject: https://github.com/marcmo/cxxproject
Trema is released under the GNU General Public License version 3.0: