aboutsummaryrefslogtreecommitdiffstats
path: root/embed/xulrunner/bindings/python/Makefile.am
blob: 68ed1efe9b800feacef623ef9f02237ee3bd6b22 (plain) (blame)
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
defsdir = $(datadir)/pygtk/2.0/defs
defs_DATA = gnomegeckoembed.defs

pkgpythondir = $(pyexecdir)/gtk-2.0
pkgpyexecdir = $(pyexecdir)/gtk-2.0

# gnomegeckoembed module
pkgpyexec_LTLIBRARIES = gnomegeckoembed.la

gnomegeckoembed_la_CPPFLAGS = \
    -I$(top_srcdir)     \
    -I$(top_srcdir)/embed/gecko/src \
    -I$(top_builddir)/embed/gecko/src   \
    $(AM_CPPFLAGS)

gnomegeckoembed_la_CFLAGS = \
    $(GGE_DEPENDENCY_CFLAGS)    \
    $(GECKO_CFLAGS)         \
    $(NO_STRICT_ALIASING_CFLAGS)    \
    $(PYGTK_CFLAGS)         \
    $(PYTHON_CFLAGS)        \
    $(AM_CFLAGS)

gnomegeckoembed_la_LIBADD = \
    $(top_builddir)/embed/gecko/src/libgnomegeckoembed-0.0.la   \
    $(GECKO_LIBS)       \
    $(PYTHON_LIBS)      \
    $(PYTHON_EXTRA_LIBS)    \
    $(PYGTK_LIBS)

gnomegeckoembed_la_LDFLAGS = \
    -module -avoid-version  \
    -export-symbols-regex initgnomegeckoembed \
    -R$(GECKO_HOME) \
    $(AM_LDFLAGS)

gnomegeckoembed_la_SOURCES = gnomegeckoembedmodule.c
nodist_gnomegeckoembed_la_SOURCES = gnomegeckoembed.c

gnomegeckoembed.c: gnomegeckoembed.defs gnomegeckoembed.override
CLEANFILES = gnomegeckoembed.c
EXTRA_DIST = gnomegeckoembed.override gnomegeckoembed.defs

.defs.c:
    (cd $(srcdir)\
     && $(PYGTK_CODEGEN) \
        --override $*.override \
        --prefix py$* $*.defs) > gen-$*.c \
    && cp gen-$*.c $*.c \
    && rm -f gen-$*.c

BINDING_HEADERS_SRCDIR_IN = \
    src/gecko-embed.h \
    src/gecko-embed-single.h \
    src/gecko-embed-types.h

BINDING_HEADERS_BUILDDIR_IN =

BINDING_HEADERS_SRCDIR      := $(addprefix $(top_srcdir)/,$(BINDING_HEADERS_SRCDIR_IN))
BINDING_HEADERS_BUILDDIR    := $(addprefix $(top_builddir)/,$(BINDING_HEADERS_BUILDDIR_IN))

regenerate-python-binding:
    $(PYGTK_H2DEF) $(sort $(BINDING_HEADERS_SRCDIR) $(BINDING_HEADERS_BUILDDIR)) > gnomegeckoembed.defs.new