Makefile.am 3.35 KB
Newer Older
1 2
AM_LDFLAGS = @auto_import_flags@

3
SUBDIRS = . reference demo
4
INCLUDES =					\
5
	-DG_LOG_DOMAIN=\"Poppler\"		\
6 7
	-I$(top_srcdir)				\
	-I$(top_srcdir)/poppler			\
8
	$(POPPLER_GLIB_CFLAGS)			\
9
	$(FREETYPE_CFLAGS)			\
10 11
	$(POPPLER_GLIB_DISABLE_DEPRECATED)	\
	$(POPPLER_GLIB_DISABLE_SINGLE_INCLUDES)
12

13 14 15 16
stamp_files = stamp-poppler-enums.h

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

stamp-poppler-enums.h: poppler-enums.h.template $(poppler_glib_public_headers)
Christian Persch's avatar
Christian Persch committed
19
	$(AM_V_GEN) $(GLIB_MKENUMS) --template $< $(filter-out $<,$^) > xgen-etbh \
20 21
	&& (cmp -s xgen-etbh poppler-enums.h || cp xgen-etbh poppler-enums.h ) \
	&& rm -f xgen-etbh \
22 23
	&& echo timestamp > $(@F)

24
poppler-enums.c: poppler-enums.c.template $(poppler_glib_public_headers)
Christian Persch's avatar
Christian Persch committed
25
	$(AM_V_GEN) $(GLIB_MKENUMS) --template $< $(filter-out $<,$^) > xgen-etbc \
26 27 28 29 30 31
	&& (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
32 33

poppler_glib_public_headers =			\
34
	poppler-action.h			\
35
	poppler-date.h				\
36 37
	poppler-document.h			\
	poppler-page.h				\
38
	poppler-attachment.h			\
39
	poppler-form-field.h			\
40
	poppler-annot.h				\
41
	poppler-layer.h				\
42
	poppler-media.h				\
43
	poppler-movie.h				\
44 45
	poppler.h

46 47 48 49
poppler_glib_includedir = $(includedir)/poppler/glib

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

53 54
lib_LTLIBRARIES = libpoppler-glib.la
libpoppler_glib_la_SOURCES =			\
55
	$(BUILT_SOURCES)			\
56
	poppler-action.cc			\
57
	poppler-date.cc				\
58 59
	poppler-document.cc			\
	poppler-page.cc				\
60
	poppler-attachment.cc			\
61
	poppler-form-field.cc			\
62
	poppler-annot.cc			\
63
	poppler-layer.cc			\
64
	poppler-media.cc			\
65
	poppler-movie.cc			\
66 67 68 69
	poppler-cached-file-loader.cc		\
	poppler-cached-file-loader.h		\
	poppler-input-stream.cc			\
	poppler-input-stream.h			\
70 71 72
	poppler.cc				\
	poppler-private.h

73 74
libpoppler_glib_la_LIBADD =				\
	$(top_builddir)/poppler/libpoppler.la		\
75
	$(top_builddir)/poppler/libpoppler-cairo.la	\
76
	$(POPPLER_GLIB_LIBS)				\
77
	$(FREETYPE_LIBS)
78

79
libpoppler_glib_la_LDFLAGS = -version-info 14:0:6 @create_shared_lib@ @auto_import_flags@
Albert Astals Cid's avatar
Albert Astals Cid committed
80

81 82
BUILT_SOURCES =					\
	poppler-enums.c				\
83
	poppler-enums.h
84 85 86 87

CLEANFILES = $(BUILT_SOURCES) $(stamp_files)
DISTCLEANFILES = $(BUILT_SOURCES) $(stamp_files)
MAINTAINERCLEANFILES = $(BUILT_SOURCES) $(stamp_files)
88 89 90 91 92

# GObject Introspection
if HAVE_INTROSPECTION
-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_GIRS =
93
INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --warn-all
94 95
INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)

96
introspection_files = $(filter-out poppler-private.h poppler-input-stream.h, $(libpoppler_glib_la_SOURCES)) $(poppler_glib_include_HEADERS) $(nodist_poppler_glib_include_HEADERS)
Albert Astals Cid's avatar
Albert Astals Cid committed
97
Poppler-0.18.gir: libpoppler-glib.la
98
Poppler_0_18_gir_INCLUDES = GObject-2.0 Gio-2.0 cairo-1.0
Albert Astals Cid's avatar
Albert Astals Cid committed
99 100
Poppler_0_18_gir_CFLAGS = $(INCLUDES) -I$(top_builddir)
Poppler_0_18_gir_LIBS = libpoppler-glib.la
Hib Eris's avatar
Hib Eris committed
101
Poppler_0_18_gir_FILES = $(introspection_files)
102 103
Poppler_0_18_gir_SCANNERFLAGS = --c-include poppler.h
Poppler_0_18_gir_EXPORT_PACKAGES = poppler-glib
104

Albert Astals Cid's avatar
Albert Astals Cid committed
105
INTROSPECTION_GIRS += Poppler-0.18.gir
106 107 108 109 110 111 112 113

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)
Albert Astals Cid's avatar
Albert Astals Cid committed
114
endif #HAVE_INTROSPECTION