From: Michael D. Lowis Date: Wed, 16 Jul 2014 22:41:48 +0000 (-0400) Subject: Initial setup of build scripts X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=35f17d18bdd3cac593afac37d2086d4be60af11a;p=archive%2Fafm.git Initial setup of build scripts --- diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..f46be81 --- /dev/null +++ b/Gemfile @@ -0,0 +1,2 @@ +gem "rake" +gem "rscons" diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..2f577eb --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,13 @@ +GEM + specs: + json (1.8.1) + rake (10.3.2) + rscons (1.6.0) + json (~> 1.0) + +PLATFORMS + ruby + +DEPENDENCIES + rake + rscons diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..c9666bb --- /dev/null +++ b/Rakefile @@ -0,0 +1,32 @@ +#------------------------------------------------------------------------------ +# Verify and Load Dependencies +#------------------------------------------------------------------------------ +require "bundler" +begin + Bundler.setup(:default, :development) +rescue Bundler::BundlerError => e + raise LoadError.new("Unable to Bundler.setup(): You probably need to run `bundle install`: #{e.message}") +end +require 'rscons' + +#------------------------------------------------------------------------------ +# Build Environment +#------------------------------------------------------------------------------ +Env = Rscons::Environment.new do |env| + env['CFLAGS'] += ['-Wall', '-Werror'] + env['LIBS'] = ['ncurses'] +end +at_exit { Env.process } + +#------------------------------------------------------------------------------ +# Rake Tasks +#------------------------------------------------------------------------------ +#task :default + +desc "Build the AFM release binary" +task :build do + Env.Program('build/afm', Dir['source/**/*.c']) +end + +desc "Remove all generate artifacts and directories" +task(:clean) { Rscons.clean } diff --git a/docs/manual.md b/docs/manual.md new file mode 100644 index 0000000..e69de29 diff --git a/source/main.c b/source/main.c new file mode 100644 index 0000000..4e7ed5a --- /dev/null +++ b/source/main.c @@ -0,0 +1,10 @@ +#include + +int main(int argc, char** argv) { + initscr(); + printw("Hello World !!!"); + refresh(); + getch(); + endwin(); + return 0; +}