Commit 648fa6e7 authored by Felix Hamann's avatar Felix Hamann

added first compiling boilerplate

parent 0f261366
Hoe.spec 'samwise' do
developer('Felix Hamann', 'nvrn@dreadworks.de')
self.readme_file = 'README.rdoc'
self.history_file = 'CHANGELOG.rdoc'
self.extra_rdoc_files = FileList['*.rdoc']
end
ENV['RC_ARCHS'] = '' if RUBY_PLATFORM =~ /darwin/
require 'rbconfig'
require 'mkmf'
$CFLAGS += ' -std=gnu99'
LIBDIR = RbConfig::CONFIG['libdir']
INCLUDEDIR = RbConfig::CONFIG['includedir']
HEADER_DIRS = [
'/opt/local/include',
'/usr/local/include',
INCLUDEDIR,
'/usr/include',
]
LIB_DIRS = [
'/opt/local/lib',
'/usr/local/lib',
LIBDIR,
'/usr/lib',
]
dir_config('samwise', HEADER_DIRS, LIB_DIRS)
unless have_header('samwise.h')
abort 'samwise.h is missing'
end
unless find_library('samwise', 'samwise_new')
abort 'libsamwise is missing'
end
create_makefile ('samwise/samwise')
#include <ruby.h>
#include "samwise.h"
VALUE samwise;
void init_samwise ()
{
samwise = rb_define_module ("Samwise");
VALUE cSamwiseRabbitMQ = rb_define_class_under (samwise, "RabbitMQ", rb_cObject);
}
#ifndef __RUBY_SAMWISE__
#define __RUBY_SAMWISE__
#include <ruby.h>
#include <samwise.h>
extern VALUE samwise;
#endif
require 'samwise/samwise'
module Samwise
VERSION = 1.2
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment