aboutsummaryrefslogtreecommitdiff
path: root/python/Makefile.am
blob: 0b606dbf1ee8ed53c72ce0b8f9dca26e4c42368e (plain)
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
defsdir = $(datadir)/pygtk/2.0/defs
defs_DATA = appindicator.defs

#CFLAGS = -Wall -Werror
INCLUDES = \
		-I$(top_srcdir)/src \
        -DG_LOG_DOMAIN=\"appindicator-python\" \
        -DDATADIR=\"$(datadir)\" \
        -DLIBDIR=\"$(libdir)\" \
        $(APPINDICATOR_PYTHON_CFLAGS) \
        $(PYTHON_INCLUDES)

pkgpythondir = $(pyexecdir)
pkgpyexecdir = $(pyexecdir)

pkgappindicatordir = $(pkgpythondir)/appindicator
pkgappindicator_PYTHON = __init__.py

appindicatordir = $(pkgpyexecdir)/appindicator
appindicator_LTLIBRARIES = _appindicator.la

_appindicator_la_LDFLAGS = -module -avoid-version -export-symbols-regex init_appindicator -lpyglib-2.0-python2.6
_appindicator_la_LIBADD = $(APPINDICATOR_PYTHON_LIBS) -L$(top_builddir)/src/.libs -lappindicator
_appindicator_la_SOURCES = appindicatormodule.c
nodist__appindicator_la_SOURCES = appindicator.c

CLEANFILES = appindicator.c
EXTRA_DIST = appindicator.override appindicator-arg-types.py $(defs_DATA)
appindicator.c: $(defs_DATA) appindicator.override

%.c: %.defs
	(cd $(srcdir) \
	 && $(PYGTK_CODEGEN) \
		--register $(PYGTK_DEFSDIR)/gtk-types.defs \
		--register $(PYGTK_DEFSDIR)/gdk-types.defs \
		--load-types appindicator-arg-types.py \
	    --override $*.override \
	    --prefix py$* $*.defs) > gen-$*.c \
	 && cp gen-$*.c $*.c \
	 && rm -f gen-$*.c