Branch and push for 2.0
[profile/ivi/pygobject2.git] / gobject / Makefile.am
1 AUTOMAKE_OPTIONS = 1.7
2 PLATFORM_VERSION = 2.0
3
4 pkgincludedir = $(includedir)/pygtk-$(PLATFORM_VERSION)
5 pkginclude_HEADERS = pygobject.h
6
7 pkgpyexecdir = $(pyexecdir)
8
9 # gobject python scripts
10 pygobjectdir = $(pkgpyexecdir)/gobject
11 pygobject_PYTHON =      \
12         __init__.py     \
13         constants.py    \
14         propertyhelper.py
15 pygobject_LTLIBRARIES = _gobject.la 
16
17 common_ldflags = -module -avoid-version
18 if PLATFORM_WIN32
19 common_ldflags += -no-undefined
20 endif
21
22 _gobject_la_CFLAGS = \
23         -I$(top_srcdir)/glib \
24         -I$(top_srcdir)/gi \
25         $(PYTHON_INCLUDES) \
26         $(FFI_CFLAGS) \
27         $(GLIB_CFLAGS) \
28          -DPY_SSIZE_T_CLEAN
29
30 if ENABLE_INTROSPECTION
31 _gobject_la_CFLAGS += $(GI_CFLAGS)
32 endif
33
34 _gobject_la_LDFLAGS = $(common_ldflags) -export-symbols-regex "_gobject|PyInit__gobject"
35 _gobject_la_LIBADD = \
36         $(GLIB_LIBS) \
37         $(FFI_LIBS) \
38         $(top_builddir)/glib/libpyglib-2.0-@PYTHON_BASENAME@.la
39 _gobject_la_SOURCES =           \
40         gobjectmodule.c         \
41         pygboxed.c              \
42         pygboxed.h              \
43         pygenum.c               \
44         pygenum.h               \
45         pygflags.c              \
46         pygflags.h              \
47         pyginterface.c          \
48         pyginterface.h          \
49         pygobject.c             \
50         pygobject.h             \
51         pygobject-private.h     \
52         pygparamspec.c          \
53         pygparamspec.h          \
54         pygpointer.c            \
55         pygpointer.h            \
56         pygtype.c               \
57         pygtype.h
58
59 if HAVE_LIBFFI
60 _gobject_la_SOURCES += ffi-marshaller.c ffi-marshaller.h
61 endif
62
63 if PLATFORM_WIN32
64 _gobject_la_CFLAGS += -DPLATFORM_WIN32
65 endif
66
67
68 all: $(pygobject_LTLIBRARIES:.la=.so)
69 check-local: $(pygobject_LTLIBRARIES:.la=.so)
70 clean-local:
71         rm -f $(pygobject_LTLIBRARIES:.la=.so)
72 .la.so:
73         $(LN_S) .libs/$@ $@ || true
74
75 -include $(top_srcdir)/git.mk