summaryrefslogtreecommitdiff
path: root/glib/Makefile.am
blob: e362ff52615390e852c77e03ce997eaf95a6ce85 (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
AM_LDFLAGS = @auto_import_flags@

SUBDIRS = . reference demo
INCLUDES =					\
	-DG_LOG_DOMAIN=\"Poppler\"		\
	-I$(top_srcdir)				\
	-I$(top_srcdir)/poppler			\
	$(POPPLER_GLIB_CFLAGS)			\
	$(FREETYPE_CFLAGS)			\
	$(FONTCONFIG_CFLAGS)                    \
	$(POPPLER_GLIB_DISABLE_DEPRECATED)	\
	$(POPPLER_GLIB_DISABLE_SINGLE_INCLUDES)

stamp_files = stamp-poppler-enums.h

poppler-enums.h: stamp-poppler-enums.h
	@true

stamp-poppler-enums.h: poppler-enums.h.template $(poppler_glib_public_headers)
	$(AM_V_GEN) $(GLIB_MKENUMS) --template $< $(filter-out $<,$^) > xgen-etbh \
	&& (cmp -s xgen-etbh poppler-enums.h || cp xgen-etbh poppler-enums.h ) \
	&& rm -f xgen-etbh \
	&& echo timestamp > $(@F)

poppler-enums.c: poppler-enums.c.template $(poppler_glib_public_headers)
	$(AM_V_GEN) $(GLIB_MKENUMS) --template $< $(filter-out $<,$^) > xgen-etbc \
	&& (cmp -s xgen-etbc poppler-enums.c || cp xgen-etbc poppler-enums.c ) \
	&& rm -f xgen-etbc

EXTRA_DIST = \
	poppler-enums.h.template	\
	poppler-enums.c.template

poppler_glib_public_headers =			\
	poppler-action.h			\
	poppler-date.h				\
	poppler-document.h			\
	poppler-page.h				\
	poppler-attachment.h			\
	poppler-form-field.h			\
	poppler-annot.h				\
	poppler-layer.h				\
	poppler-media.h				\
	poppler-movie.h				\
	poppler.h

poppler_glib_includedir = $(includedir)/poppler/glib

poppler_glib_include_HEADERS =			\
	$(poppler_glib_public_headers)		\
	poppler-enums.h
nodist_poppler_glib_include_HEADERS = poppler-features.h

lib_LTLIBRARIES = libpoppler-glib.la
libpoppler_glib_la_SOURCES =			\
	$(BUILT_SOURCES)			\
	poppler-action.cc			\
	poppler-date.cc				\
	poppler-document.cc			\
	poppler-page.cc				\
	poppler-attachment.cc			\
	poppler-form-field.cc			\
	poppler-annot.cc			\
	poppler-layer.cc			\
	poppler-media.cc			\
	poppler-movie.cc			\
	poppler.cc				\
	poppler-private.h

libpoppler_glib_la_LIBADD =				\
	$(top_builddir)/poppler/libpoppler.la		\
	$(top_builddir)/poppler/libpoppler-cairo.la	\
	$(POPPLER_GLIB_LIBS)				\
	$(FREETYPE_LIBS)				\
	$(FONTCONFIG_LIBS)

libpoppler_glib_la_LDFLAGS = -version-info 10:0:2 @create_shared_lib@ @auto_import_flags@

BUILT_SOURCES =					\
	poppler-enums.c				\
	poppler-enums.h

CLEANFILES = $(BUILT_SOURCES) $(stamp_files)
DISTCLEANFILES = $(BUILT_SOURCES) $(stamp_files)
MAINTAINERCLEANFILES = $(BUILT_SOURCES) $(stamp_files)

# GObject Introspection
if HAVE_INTROSPECTION
-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_GIRS =
INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir)
INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)

introspection_files = $(libpoppler_glib_la_SOURCES) $(poppler_glib_include_HEADERS)
Poppler-0.16.gir: libpoppler-glib.la
Poppler_0_16_gir_INCLUDES = GObject-2.0 cairo-1.0
Poppler_0_16_gir_CFLAGS = $(INCLUDES) -I$(top_builddir)
Poppler_0_16_gir_LIBS = libpoppler-glib.la
Poppler_0_16_gir_FILES = $(addprefix $(srcdir)/, $(introspection_files))

INTROSPECTION_GIRS += Poppler-0.16.gir

girdir = $(datadir)/gir-1.0
dist_gir_DATA = $(INTROSPECTION_GIRS)

typelibsdir = $(libdir)/girepository-1.0
typelibs_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)

CLEANFILES += $(dist_gir_DATA) $(typelibs_DATA)
endif #HAVE_INTROSPECTION