]> git.mdlowis.com Git - archive/afm.git/commitdiff
Build library files with the main project
authorMichael D. Lowis <mike@mdlowis.com>
Sun, 20 Jul 2014 16:25:54 +0000 (12:25 -0400)
committerMichael D. Lowis <mike@mdlowis.com>
Sun, 20 Jul 2014 16:25:54 +0000 (12:25 -0400)
Rakefile

index 82271cbb4a4513816cff731359f854416e5e75b2..e7260f58c41a59df49390e67a60736039679dd02 100644 (file)
--- a/Rakefile
+++ b/Rakefile
@@ -9,11 +9,19 @@ rescue Bundler::BundlerError => e
 end
 require 'rscons'
 
+#------------------------------------------------------------------------------
+# Checkout Git Submodules
+#------------------------------------------------------------------------------
+if Dir['modules/**/.git'].length == 0
+  sh 'git submodule update --init'
+end
+
 #------------------------------------------------------------------------------
 # Build Environment
 #------------------------------------------------------------------------------
 Env = Rscons::Environment.new do |env|
-  env['CFLAGS'] += ['-Wall', '-Werror']
+  env['CPPPATH'] += Dir['modules/data-structures/source/**/']
+  #env['CFLAGS'] += ['-Wall', '-Werror']
   env['LIBS'] = ['ncurses']
 end
 at_exit { Env.process }
@@ -24,9 +32,14 @@ at_exit { Env.process }
 task :default => [:build]
 
 desc "Build the AFM release binary"
-task :build do
-  Env.Program('build/afm', Dir['source/**/*.c'])
+task :build => ['modules/data-structures/source'] do
+  Env.Program('build/afm', Dir['source/**/*.c', 'modules/data-structures/source/**/*.c'])
 end
 
 desc "Remove all generate artifacts and directories"
 task(:clean) { Rscons.clean }
+
+desc "Remove all generated artifacts and directories as well as any git submodules"
+task :clobber => [:clean] do
+    sh 'git submodule deinit -f .'
+end