]> git.mdlowis.com Git - archive/afm.git/commitdiff
Initial setup of build scripts
authorMichael D. Lowis <mike@mdlowis.com>
Wed, 16 Jul 2014 22:41:48 +0000 (18:41 -0400)
committerMichael D. Lowis <mike@mdlowis.com>
Wed, 16 Jul 2014 22:41:48 +0000 (18:41 -0400)
Gemfile [new file with mode: 0644]
Gemfile.lock [new file with mode: 0644]
Rakefile [new file with mode: 0644]
docs/manual.md [new file with mode: 0644]
source/main.c [new file with mode: 0644]

diff --git a/Gemfile b/Gemfile
new file mode 100644 (file)
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 (file)
index 0000000..2f577eb
--- /dev/null
@@ -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 (file)
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 (file)
index 0000000..e69de29
diff --git a/source/main.c b/source/main.c
new file mode 100644 (file)
index 0000000..4e7ed5a
--- /dev/null
@@ -0,0 +1,10 @@
+#include <ncurses.h>
+
+int main(int argc, char** argv) {
+    initscr();
+    printw("Hello World !!!");
+    refresh();
+    getch();
+    endwin();
+    return 0;
+}