From 6e53b8af04f187ab13951c03f703d1a433ab81a3 Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Sun, 20 Jul 2014 12:25:54 -0400 Subject: [PATCH] Build library files with the main project --- Rakefile | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/Rakefile b/Rakefile index 82271cb..e7260f5 100644 --- 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 -- 2.49.0