Enumerations can be negative
[gnome.gobject-introspection] / giscanner / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2
3 INCLUDES = -I$(top_srcdir)/girepository
4 BUILT_SOURCES =                 \
5         scannerparser.c         \
6         scannerparser.h         \
7         scannerlexer.c          \
8         scannerlexer.h
9
10 CLEANFILES =            \
11         scannerparser.c         \
12         scannerparser.h         \
13         scannerlexer.c          \
14         scannerlexer.h
15 AM_YFLAGS = -d -t
16
17 # Why do I have to do this automake?
18 scannerlexer.h: scannerlexer.c
19
20 noinst_LTLIBRARIES = libgiscanner.la
21
22 libgiscanner_la_SOURCES = \
23         sourcescanner.c                         \
24         sourcescanner.h                         \
25         scannerlexer.l                          \
26         scannerparser.y                         \
27         grealpath.h
28 libgiscanner_la_LIBADD = $(GOBJECT_LIBS)
29 libgiscanner_la_CFLAGS = $(GOBJECT_CFLAGS)
30
31 GCOVSOURCES = $(libgiscanner_la_SOURCES)
32
33 # Python module
34 pkgpyexecdir = $(pkglibdir)/giscanner
35 pkgpyexec_LTLIBRARIES = _giscanner.la
36 pkgpyexec_PYTHON =              \
37         __init__.py             \
38         annotationparser.py     \
39         ast.py                  \
40         cachestore.py           \
41         config.py               \
42         dumper.py               \
43         girparser.py            \
44         girwriter.py            \
45         glibast.py              \
46         glibtransformer.py      \
47         libtoolimporter.py      \
48         minixpath.py            \
49         odict.py                \
50         shlibs.py               \
51         scannermain.py          \
52         sourcescanner.py        \
53         transformer.py          \
54         utils.py                \
55         xmlwriter.py
56
57 _giscanner_la_CFLAGS = \
58         $(PYTHON_INCLUDES) \
59         $(GOBJECT_CFLAGS) \
60         -I$(top_srcdir)/giscanner
61 _giscanner_la_LIBADD = libgiscanner.la $(GOBJECT_LIBS)
62
63 _giscanner_la_LDFLAGS = \
64         -module -avoid-version -export-symbols-regex init_giscanner
65
66 if OS_WIN32
67 # Yuck. Probably there is a way to get this from Python, but I don't
68 # know how. Use -Wl to avoid libtool crack.
69 _giscanner_la_LDFLAGS += -Wl,$(pyexecdir)/../../libs/libpython25.a -no-undefined
70 endif
71
72 _giscanner_la_SOURCES = giscannermodule.c
73
74 if OS_WIN32
75 BUILT_SOURCES += _giscanner.pyd
76 CLEANFILES += _giscanner.pyd
77
78 _giscanner.pyd: _giscanner.la
79         cp .libs/_giscanner.dll $@
80
81 install-exec-hook:
82         mv $(pkgpyexecdir)/_giscanner.dll $(pkgpyexecdir)/_giscanner.pyd
83         rm $(pkgpyexecdir)/_giscanner.dll.a
84         rm $(pkgpyexecdir)/_giscanner.la
85 endif
86
87 include $(top_srcdir)/gcov.mak