]> icculus.org git repositories - mikachu/openbox.git/blob - wrap/Makefile.am
include the .i's in the dist
[mikachu/openbox.git] / wrap / Makefile.am
1 oblibdir = $(libdir)/openbox
2
3 #pythondir = $(oblibdir)/python
4 obpythondir = $(oblibdir)/python
5
6 CPPFLAGS = $(XFT_CFLAGS) $(SWIG_PYTHON_CFLAGS) @CPPFLAGS@
7 CXXFLAGS = $(filter-out -W -Wall,@CXXFLAGS@)
8 LDFLAGS  = -module -avoid-version
9 INCLUDES = -I.. -I../otk -I../src
10
11 obpython_LTLIBRARIES = otkpy.la obpy.la
12 obpython_PYTHON = otk.py ob.py
13
14 otkpy_la_SOURCES  = wrap_otk.cc
15 #otkpy_la_LIBADD   = ../otk/libotk.la   # do this for the global version of otk
16
17 obpy_la_SOURCES  = wrap_ob.cc
18
19 EXTRA_DIST = otk.i ob.i callback.i
20
21 CLEANFILES = wrap_* *.py
22 MAINTAINERCLEANFILES = Makefile.in
23
24 install-exec-hook:
25         $(mkinstalldirs) "$(DESTDIR)$(obpythondir)"
26         cd "$(DESTDIR)$(obpythondir)" && \
27                 $(RM) -f _otk.so && $(LN_S) otkpy.so _otk.so
28         $(mkinstalldirs) "$(DESTDIR)$(obpythondir)"
29         cd "$(DESTDIR)$(obpythondir)" && \
30                 $(RM) -f _ob.so && $(LN_S) obpy.so _ob.so
31
32 uninstall-am:
33         $(RM) "$(DESTDIR)$(obpythondir)/_otk.so"
34         $(RM) "$(DESTDIR)$(obpythondir)/_ob.so"
35         rmdir -p $(obpythondir) || true
36
37 %.py: wrap_%.cc
38
39 otk.i: $(wildcard ../otk/*.hh)
40         @touch $@
41
42 ob.i: $(addprefix ../src/,openbox.hh screen.hh client.hh python.hh frame.hh)
43         @touch $@
44
45 wrap_otk.cc: otk.i
46         $(SWIG) $(SWIG_PYTHON_OPT) $(INCLUDES) $(filter -I%,$(CPPFLAGS)) -nodefault -o $@ $<
47
48 wrap_ob.cc: ob.i callback.i
49         $(SWIG) $(SWIG_PYTHON_OPT) $(INCLUDES) $(filter -I%,$(CPPFLAGS)) -nodefault -o $@ $<
50