-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile.am
129 lines (89 loc) · 2.7 KB
/
Makefile.am
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
#
# xwiimote-bindings - makefile
# Written by David Herrmann, 2013
# Dedicated to the Public Domain
#
#
# miscellaneous
#
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
AM_MAKEFLAGS = --no-print-directory
AUTOMAKE_OPTIONS = color-tests
SUBDIRS = .
.DELETE_ON_ERROR:
MOSTLYCLEANFILES =
CLEANFILES =
#
# Distribution includes
#
EXTRA_DIST = \
autogen.sh \
README \
COPYING \
LICENSE \
binding_api.txt \
src/xwiimote.i \
python/setup.py.in \
perl/Makefile.PL.in
#
# python bindings
#
if HAVE_PYTHON
MOSTLYCLEANFILES += python/installed_files.log
all-local-python: _xwiimote.so
$(builddir)/%_wrap.c %.py: $(srcdir)/src/xwiimote.i
$(SWIG) -python -o $(builddir)/xwiimote_wrap.c $(srcdir)/src/xwiimote.i
_%.so: $(builddir)/%_wrap.c
$(PYTHON) python/setup.py build_ext
clean-local-python:
-@rm -vfr xwiimote.py xwiimote_wrap.c ./build/
install-exec-hook-python: $(builddir)/xwiimote_wrap.c
if test -n "$(DESTDIR)"; then\
$(PYTHON) python/setup.py install --root=$(DESTDIR) --prefix=$(prefix) --record=@top_builddir@/python/installed_files.log; \
else \
$(PYTHON) python/setup.py install --prefix=$(prefix) --record=@top_builddir@/python/installed_files.log; \
fi
uninstall-hook-python:
cat @top_builddir@/python/installed_files.log \
| awk '{print "$(DESTDIR)"$$1}' | xargs rm -vf
else # HAVE_PYTHON
install-exec-hook-python:
uninstall-hook-python:
all-local-python:
clean-local-python:
endif # HAVE_PYTHON
#
# perl bindings
#
if HAVE_PERL
CLEANFILES += \
$(builddir)/perl/perl_wrap.c \
$(builddir)/perl/xwiimote.pm \
$(builddir)/perl/xwiimote.bs \
$(builddir)/perl/xwiimote.so
all-local-perl: $(builddir)/perl/xwiimote.so
$(builddir)/perl/perl_wrap.c: $(srcdir)/src/xwiimote.i
$(SWIG) -perl -module xwiimote -o $@ $(srcdir)/src/xwiimote.i
$(builddir)/perl/Makefile.perl: $(builddir)/perl/Makefile.PL
cd $(builddir)/perl && $(PERL) Makefile.PL PREFIX=$(prefix) MAKEFILE=Makefile.perl
$(builddir)/perl/xwiimote.so: $(builddir)/perl/perl_wrap.c $(builddir)/perl/Makefile.perl
cd $(builddir)/perl && $(MAKE) -f Makefile.perl
install-exec-hook-perl: $(builddir)/perl/Makefile.perl
cd $(builddir)/perl && $(MAKE) -f Makefile.perl install
uninstall-hook-perl: $(builddir)/perl/Makefile.perl
cd $(builddir)/perl && $(MAKE) -f Makefile.perl uninstall
clean-local-perl:
cd $(builddir)/perl && if test -f Makefile.perl ; then $(MAKE) -f Makefile.perl realclean; fi
else # HAVE_PERL
install-exec-hook-perl:
uninstall-hook-perl:
all-local-perl:
clean-local-perl:
endif # HAVE_PERL
#
# global rules
#
install-exec-hook: install-exec-hook-python install-exec-hook-perl
uninstall-hook: uninstall-hook-python uninstall-hook-perl
all-local: all-local-python all-local-perl
clean-local: clean-local-python clean-local-perl