-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
66 changed files
with
862 additions
and
305 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,4 @@ branches: | |
before_install: | ||
- sudo apt-get update -qq | ||
- sudo apt-get install -qq llvm-gcc-4.6 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
linux: --tags ~@wip --tags ~@mac | ||
mac: --tags ~@wip --tags ~@linux | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.hello.depends | ||
hello.bundle | ||
hello.o | ||
hello.so | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,3 @@ | ||
require "paper-house" | ||
|
||
PaperHouse::CExtensionTask.new :hello | ||
|
||
|
||
################################################################################ | ||
# | ||
# If you want to use non-default compiler like llvm-gcc, | ||
# please specify the cc= property or pass the CC= option to rake command. | ||
# | ||
################################################################################ | ||
|
||
PaperHouse::CExtensionTask.new :llvm_hello do | task | | ||
task.library_name = "hello" | ||
task.cc = "llvm-gcc" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
require "paper-house" | ||
|
||
PaperHouse::CExtensionTask.new :hello do | task | | ||
task.cc = "llvm-gcc" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.hello.depends | ||
hello | ||
hello.o | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,3 @@ | ||
require "paper-house" | ||
|
||
PaperHouse::ExecutableTask.new :hello | ||
|
||
|
||
################################################################################ | ||
# | ||
# If you want to use non-default compiler like llvm-gcc, please | ||
# specify the cc= property or pass the CC= option to rake command. | ||
# | ||
################################################################################ | ||
|
||
PaperHouse::ExecutableTask.new :llvm_hello do | task | | ||
task.cc = "llvm-gcc" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
require "paper-house" | ||
|
||
PaperHouse::ExecutableTask.new :hello do | task | | ||
task.cc = "llvm-gcc" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.hello.depends | ||
hello | ||
hello.o | ||
main.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
require "paper-house" | ||
|
||
PaperHouse::ExecutableTask.new :sqrt do | task | | ||
task.executable_name = "print_sqrt" | ||
PaperHouse::ExecutableTask.new :hello do | task | | ||
task.executable_name = "hello" | ||
task.target_directory = "objects" | ||
task.sources = "sources/*.c" | ||
task.includes = "includes" | ||
task.cflags = [ "-Wall", "-Wextra" ] | ||
task.library_dependencies = "m" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
void print_hello(); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#include <stdio.h> | ||
|
||
void | ||
print_hello() { | ||
printf( "Hello, PaperHouse!\n"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
#include <stdlib.h> | ||
#include "sqrt.h" | ||
#include "hello.h" | ||
|
||
int | ||
main( int argc, char *argv[] ) { | ||
print_sqrt( atof( argv[ 1 ] ) ); | ||
main() { | ||
print_hello(); | ||
return 0; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.hello.depends | ||
.libhello.depends | ||
hello | ||
hello.o | ||
libhello.so | ||
libhello.so.0 | ||
libhello.so.0.1.0 | ||
main.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,16 @@ | ||
require "paper-house" | ||
|
||
libhello = PaperHouse::SharedLibraryTask.new :libhello do | task | | ||
$libhello = PaperHouse::SharedLibraryTask.new :libhello do | task | | ||
task.version = "0.1.0" | ||
task.sources = "hello.c" | ||
end | ||
|
||
task :hello => [ libhello.linker_name, libhello.soname ] | ||
|
||
file libhello.linker_name => :libhello do | task | | ||
symlink libhello.target_file_name, task.name | ||
end | ||
|
||
file libhello.soname => :libhello do | task | | ||
symlink libhello.target_file_name, task.name | ||
end | ||
task :hello => [ :libhello, $libhello.linker_name, $libhello.soname ] | ||
|
||
PaperHouse::ExecutableTask.new :hello do | task | | ||
task.sources = "main.c" | ||
task.ldflags = "-L." | ||
task.library_dependencies = "hello" | ||
end | ||
|
||
|
||
################################################################################ | ||
# | ||
# If you want to use non-default compiler like llvm-gcc, | ||
# please specify the cc= property or pass the CC= option to rake command. | ||
# | ||
################################################################################ | ||
|
||
task :llvm_hello => [ libhello.linker_name, libhello.soname ] | ||
|
||
PaperHouse::ExecutableTask.new :llvm_hello do | task | | ||
task.sources = "main.c" | ||
task.cc = "llvm-gcc" | ||
task.ldflags = "-L." | ||
task.library_dependencies = "hello" | ||
end | ||
load "symlinks.rake" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
require "paper-house" | ||
|
||
$libhello = PaperHouse::SharedLibraryTask.new :libhello do | task | | ||
task.version = "0.1.0" | ||
task.sources = "hello.c" | ||
task.cc = "llvm-gcc" | ||
end | ||
|
||
|
||
task :hello => [ :libhello, $libhello.linker_name, $libhello.soname ] | ||
|
||
PaperHouse::ExecutableTask.new :hello do | task | | ||
task.sources = "main.c" | ||
task.cc = "llvm-gcc" | ||
task.ldflags = "-L." | ||
end | ||
|
||
load "symlinks.rake" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[ $libhello.linker_name, $libhello.soname ].each do | each | | ||
file each do | task | | ||
symlink $libhello.target_file_name, task.name | ||
end | ||
|
||
CLOBBER.include each if FileTest.exists?( each ) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.hello.depends | ||
.libhello.depends | ||
hello | ||
hello.o | ||
libhello.so | ||
libhello.so.0 | ||
libhello.so.0.1.0 | ||
main.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,27 @@ | ||
require "paper-house" | ||
|
||
task :sqrt => :libsqrt | ||
|
||
libsqrt = PaperHouse::SharedLibraryTask.new :libsqrt do | task | | ||
task.library_name = "printsqrt" | ||
libhello = PaperHouse::SharedLibraryTask.new :libhello do | task | | ||
task.library_name = "hello" | ||
task.version = "0.1.0" | ||
task.target_directory = "objects" | ||
task.sources = "sources/sqrt.c" | ||
task.sources = "sources/hello.c" | ||
task.includes = "includes" | ||
task.cflags = [ "-Werror", "-Wall", "-Wextra" ] | ||
end | ||
|
||
task :sqrt => [ libsqrt.linker_name, libsqrt.soname ] | ||
|
||
file libsqrt.linker_name => :libsqrt do | task | | ||
symlink File.join( "objects", libsqrt.target_file_name ), task.name | ||
end | ||
|
||
file libsqrt.soname => :libsqrt do | task | | ||
symlink File.join( "objects", libsqrt.target_file_name ), task.name | ||
end | ||
task :hello => [ :libhello, libhello.linker_name, libhello.soname ] | ||
|
||
PaperHouse::ExecutableTask.new :sqrt do | task | | ||
PaperHouse::ExecutableTask.new :hello do | task | | ||
task.sources = "sources/main.c" | ||
task.includes = "includes" | ||
task.ldflags = "-L." | ||
task.library_dependencies = [ "printsqrt", "m" ] | ||
end | ||
|
||
[ libhello.linker_name, libhello.soname ].each do | each | | ||
file each do | task | | ||
symlink File.join( "objects", libhello.target_file_name ), task.name | ||
end | ||
|
||
CLOBBER.include each if FileTest.exists?( each ) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
void print_hello(); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#include <stdio.h> | ||
|
||
void | ||
print_hello() { | ||
printf( "Hello, PaperHouse!\n" ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
#include <stdlib.h> | ||
#include "sqrt.h" | ||
#include "hello.h" | ||
|
||
int | ||
main( int argc, char *argv[] ) { | ||
if ( argc > 1 ) { | ||
print_sqrt( atof( argv[ 1 ] ) ); | ||
} | ||
main() { | ||
print_hello(); | ||
return 0; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.hello.depends | ||
.libhello.depends | ||
hello | ||
hello.o | ||
libhello.a | ||
main.o | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
require "paper-house" | ||
|
||
task :hello => :libhello | ||
|
||
PaperHouse::StaticLibraryTask.new :libhello do | task | | ||
task.cc = "llvm-gcc" | ||
task.sources = "hello.c" | ||
end | ||
|
||
PaperHouse::ExecutableTask.new :hello do | task | | ||
task.cc = "llvm-gcc" | ||
task.ldflags = "-L." | ||
task.sources = "main.c" | ||
end |
Oops, something went wrong.