-ext_libs = ["container", "draggies", "trans_x11", "file_dialog"].map do |lib|
- lib = "esmart_" + lib
- Library.new(lib, ENV["ESMART_PREFIX"] || "/usr/local", "src/#{lib}")
+PKG_NAME = "ruby-esmart"
+
+modules = [:esmart, :esmart_container, :esmart_draggies,
+ :esmart_file_dialog,:esmart_trans_x11]
+module_objects = {
+ :esmart => [:rb_esmart],
+ :esmart_container => [:rb_esmart_container],
+ :esmart_draggies => [:rb_esmart_draggies],
+ :esmart_file_dialog => [:rb_esmart_file_dialog],
+ :esmart_trans_x11 => [:rb_esmart_trans_x11]
+}
+
+module_tasks = modules.map { |mod| "ext_#{mod}".to_sym }
+
+task :default => module_tasks
+
+config = Rake::ConfigureTask.new do |t|
+ t.tests << Rake::ConfigureTask::
+ PkgConfigTest.new("esmart", :is_critical => true)
+end
+
+module_tasks.each do |mt|
+ task mt => [:pre_ext]