diff options
Diffstat (limited to 'sca-cpp/trunk/runtime/extensions/ruby/extension')
3 files changed, 0 insertions, 115 deletions
diff --git a/sca-cpp/trunk/runtime/extensions/ruby/extension/Makefile.am b/sca-cpp/trunk/runtime/extensions/ruby/extension/Makefile.am deleted file mode 100644 index 41ce75925b..0000000000 --- a/sca-cpp/trunk/runtime/extensions/ruby/extension/Makefile.am +++ /dev/null @@ -1,34 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -SUBDIRS = - -libdir=$(prefix)/extensions/ruby/lib -BUILT_SOURCES = extension_build - -EXTRA_DIST = src - -extension_build: src/Extension.cpp src/extconf.rb - cd src; ruby extconf.rb; make - touch extension_build - -clean: - cd src;make clean - rm -f extension_build - -install-exec-hook: - cp src/tuscany_sca_ruby.* $(libdir) - diff --git a/sca-cpp/trunk/runtime/extensions/ruby/extension/src/Extension.cpp b/sca-cpp/trunk/runtime/extensions/ruby/extension/src/Extension.cpp deleted file mode 100644 index 458700e5f1..0000000000 --- a/sca-cpp/trunk/runtime/extensions/ruby/extension/src/Extension.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* $Rev$ $Date$ */ - -#if defined(WIN32) || defined (_WINDOWS) -#define SCA_RUBYEXTENSION_API __declspec(dllexport) -#else -#define SCA_RUBYEXTENSION_API -#endif - -#include "tuscany/sca/ruby/Ruby.h" -#include "tuscany/sca/ruby/RubyCompositeContext.h" - -extern "C" -{ - - // Implement the Sca::locateService module function - SCA_RUBYEXTENSION_API VALUE tuscany_sca_ruby_locateService(VALUE module, VALUE value) - { - // Locate the service - const char* serviceName = rb_string_value_cstr(&value); - return tuscany::sca::ruby::RubyCompositeContext::locateService(serviceName); - } - - // Initialize the Ruby extension - SCA_RUBYEXTENSION_API void Init_tuscany_sca_ruby() - { - - // Define the Sca::locateService() function - VALUE module = rb_define_module("SCA"); - rb_define_module_function(module, "locateService", (VALUE(*)(ANYARGS))tuscany_sca_ruby_locateService, 1); - - } - - SCA_RUBYEXTENSION_API void Init_libtuscany_sca_ruby() - { - Init_tuscany_sca_ruby(); - } -} diff --git a/sca-cpp/trunk/runtime/extensions/ruby/extension/src/extconf.rb b/sca-cpp/trunk/runtime/extensions/ruby/extension/src/extconf.rb deleted file mode 100644 index 9c41843d63..0000000000 --- a/sca-cpp/trunk/runtime/extensions/ruby/extension/src/extconf.rb +++ /dev/null @@ -1,25 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - - require 'mkmf' - CONFIG["CC"] = "g++" - $CPPFLAGS << " -I../../src " - $LIBPATH << "../../src/.libs" - $LIBS << " -ltuscany_sca_ruby_lang " - create_makefile 'tuscany_sca_ruby' |