-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathMakefile
140 lines (100 loc) · 3.15 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
export LD_LIBRARY_PATH := $(shell pwd)
export GI_TYPELIB_PATH := $(shell pwd)
RUBY1.8_HEADERS=-I/usr/lib/ruby/1.8/x86_64-linux/ -I/usr/lib/ruby/1.8/i686-linux/
RUBY1.9.1_HEADERS=-I/usr/lib/ruby/1.9.1/x86_64-linux/ -I/usr/lib/ruby/1.9.1/i686-linux/
PHP_HEADERS=`php-config --includes`
all: libobject.so ValaObject-0.1.typelib c-source
run: run-gir run-valabind
run-gir: run-gir-ruby run-gir-python run-gir-php run-gir-lua run-gir-gnome-js run-gir-nodejs
run-valabind: run-valabind-ruby run-valabind-python run-valabind-php run-valabind-lua run-gir-nodejs run-node-webkit-valabind
########## test gir bingings ##########
run-ruby-gir:
-ruby gir/ruby/test.rb
run-python-gir:
-python gir/python/test.py
run-php-gir:
-php gir/php/test.php
run-perl-gir:
-perl gir/perl/test.pl
run-lua-gir:
-lua gir/lua/test.lua
-luajit-2.0.0-beta9 gir/lua/test.lua
run-gnome-js:
-gjs gir/javascript/test.gnome.js
-seed gir/javascript/test.gnome.js
run-nodejs-gir:
-node gir/javascript/test.node.js
########## test generated bindings with Valabind and valabind ##########
# TODO
run-ruby-valabind:
-make run -C valabind/ruby
# TODO
run-python-valabind:
-python valabind/python/test.py
run-php-valabind:
-make run -C valabind/php
# TODO
run-perl-valabind:
-perl valabind/perl/test.pl
# TODO
run-lua-valabind:
-lua valabind/lua/test.lua
run-nodejs-valabind:
-make run -C valabind/node.js
run-node-webkit-valabind:
-make run -C valabind/node-webkit
run-java-valabind:
-make run -C valabind/java
run-d-valabind:
-make run -C valabind/dlang
########## generate bindings with Valabind ##########
# TODO
ruby-valabind: libobject.so c-source
-make bind -C valabind/ruby
# TODO
python-valabind: libobject.so c-source
valabind-cc python pythonobject -NValaObject libobject.vapi -I. `pkg-config --cflags --libs gobject-2.0` -I/usr/include -L. -lobject -x
php-valabind:
-make bind -C valabind/php
# TODO
perl-valabind: libobject.so c-source
valabind-cc perl perlobject -NValaObject libobject.vapi -I. `pkg-config --cflags --libs gobject-2.0` -I/usr/include -L. -lobject -x
# TODO
lua-valabind: libobject.so c-source
valabind-cc lua luaobject -NValaObject libobject.vapi -I. `pkg-config --cflags --libs gobject-2.0` -I/usr/include -L. -lobject -x
nodejs-valabind:
-make bind -C valabind/node.js
node-webkit-valabind:
-make bind -C valabind/node-webkit
java-valabind:
-make bind -C valabind/java
d-valabind-swig:
-make swig -C valabind/dlang
d-valabind:
-make bind -C valabind/dlang
########## Vala Stuff ##########
c-source:
valac -H object.h -C --vapi=object.vapi --library=libobject object.vala
libobject.so:
valac \
--enable-experimental \
-X -fPIC -X -shared \
--library=libobject \
--gir=ValaObject-0.1.gir \
-o libobject.so \
object.vala
ValaObject-0.1.typelib:
g-ir-compiler \
--shared-library=libobject.so \
--output=ValaObject-0.1.typelib \
ValaObject-0.1.gir
########## Other ##########
clean:
rm -fr $(shell cat .gitignore)
make clean -C valabind/node.js
make clean -C valabind/node-webkit
make clean -C valabind/php
make clean -C valabind/ruby
make clean -C valabind/java
make clean -C valabind/dlang
make clean -C valabind/c++