diff options
author | Martin DeMello <mdemello@google.com> | 2019-02-07 00:52:02 -0800 |
---|---|---|
committer | John Fultz <jfultz@wolfram.com> | 2019-02-07 16:20:28 -0600 |
commit | 9e93419a236f34cfb016461a7e37a1280177e05a (patch) | |
tree | 2196679c562381de0ae9ccc44835733d01c0dbf9 /bindings/Makefile | |
parent | d387d2e719f736d28db797d47ffc4fca29a202fa (diff) |
Add ruby bindings
Diffstat (limited to 'bindings/Makefile')
-rw-r--r-- | bindings/Makefile | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/bindings/Makefile b/bindings/Makefile index 1726d81..70415c2 100644 --- a/bindings/Makefile +++ b/bindings/Makefile @@ -6,6 +6,7 @@ CC=g++ # QT=QtCore # Qt4 QT=Qt5Core # Qt5 LUA=lua +RUBY=ruby-2.6 #--------------------------------- # Flags @@ -17,6 +18,7 @@ PYTHON3FLAGS := $(shell pkg-config python3 --cflags) PHPFLAGS := $(shell php-config --includes) PHPLIBS := $(shell php-config --libs) LUAFLAGS := $(shell pkg-config $(LUA) --cflags) +RUBYFLAGS := $(shell pkg-config $(RUBY) --cflags) INCLUDES=-I.. QUACKLELIBS=../lib/release/libquackle.a ../quackleio/lib/release/libquackleio.a @@ -82,6 +84,19 @@ lua: lua/quackle_wrap.o $(CC) -std=c++11 -shared $(LUAFLAGS) -Wl,--whole-archive $(QUACKLELIBS) -Wl,--no-whole-archive $(QTLIBS) $< -o lua/quackle.so #--------------------------------- +# Ruby + +ruby/quackle_wrap.cxx: + @test -d ruby || mkdir ruby + swig -c++ -o $@ $(INCLUDES) $(QTFLAGS) -ruby ruby_quackle.i + +ruby/quackle_wrap.o: ruby/quackle_wrap.cxx + $(CC) -std=c++11 -fPIC $(QTFLAGS) $(RUBYFLAGS) $(INCLUDES) -c $< -o $@ + +ruby: ruby/quackle_wrap.o + $(CC) -std=c++11 -shared -Wl,--whole-archive $(QUACKLELIBS) -Wl,--no-whole-archive $(QTLIBS) $< -o ruby/quackle.so + +#--------------------------------- .PHONY: clean go @@ -90,6 +105,7 @@ clean: -rm -rf python3/quackle.py -rm -rf python3/__pycache__ -rm -rf php/*php* + -rm -rf ruby/quackle.rb -rm -rf */*_wrap.cxx -rm -rf */*.o -rm -rf */*.so |