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

3
SUBDIRS = . reference demo
Hib Eris's avatar
Hib Eris committed
4 5

lib_LTLIBRARIES = libpoppler-glib.la
6

7 8 9 10
stamp_files = stamp-poppler-enums.h

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

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

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

Hib Eris's avatar
Hib Eris committed
23 24
EXTRA_DIST =					\
	poppler-enums.h.template		\
25
	poppler-enums.c.template
26 27

poppler_glib_public_headers =			\
28
	poppler-action.h			\
29
	poppler-date.h				\
30 31
	poppler-document.h			\
	poppler-page.h				\
32
	poppler-attachment.h			\
33
	poppler-form-field.h			\
34
	poppler-annot.h				\
35
	poppler-layer.h				\
36
	poppler-media.h				\
37
	poppler-movie.h				\
38
	poppler-structure-element.h		\
39 40
	poppler.h

41 42 43 44
poppler_glib_includedir = $(includedir)/poppler/glib

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

48
libpoppler_glib_la_SOURCES =			\
49
	$(BUILT_SOURCES)			\
50
	poppler-action.cc			\
51
	poppler-date.cc				\
52 53
	poppler-document.cc			\
	poppler-page.cc				\
54
	poppler-attachment.cc			\
55
	poppler-form-field.cc			\
56
	poppler-annot.cc			\
57
	poppler-layer.cc			\
58
	poppler-media.cc			\
59
	poppler-movie.cc			\
60 61 62 63
	poppler-cached-file-loader.cc		\
	poppler-cached-file-loader.h		\
	poppler-input-stream.cc			\
	poppler-input-stream.h			\
64
	poppler-structure-element.cc		\
65 66 67
	poppler.cc				\
	poppler-private.h

Hib Eris's avatar
Hib Eris committed
68 69 70 71 72 73 74 75 76
libpoppler_glib_la_CPPFLAGS =			\
	-DG_LOG_DOMAIN=\"Poppler\"		\
	-I$(top_srcdir)				\
	-I$(top_srcdir)/poppler			\
	$(POPPLER_GLIB_CFLAGS)			\
	$(FREETYPE_CFLAGS)			\
	$(POPPLER_GLIB_DISABLE_DEPRECATED)	\
	$(POPPLER_GLIB_DISABLE_SINGLE_INCLUDES)

77 78
libpoppler_glib_la_LIBADD =				\
	$(top_builddir)/poppler/libpoppler.la		\
79
	$(top_builddir)/poppler/libpoppler-cairo.la	\
80
	$(PTHREAD_LIBS)					\
81
	$(POPPLER_GLIB_LIBS)				\
82
	$(FREETYPE_LIBS)
83

Hib Eris's avatar
Hib Eris committed
84
libpoppler_glib_la_LDFLAGS =			\
Albert Astals Cid's avatar
Albert Astals Cid committed
85
	-version-info 17:0:9			\
Hib Eris's avatar
Hib Eris committed
86 87
	@create_shared_lib@			\
	@auto_import_flags@
Albert Astals Cid's avatar
Albert Astals Cid committed
88

89 90
BUILT_SOURCES =					\
	poppler-enums.c				\
91
	poppler-enums.h
92 93 94 95

CLEANFILES = $(BUILT_SOURCES) $(stamp_files)
DISTCLEANFILES = $(BUILT_SOURCES) $(stamp_files)
MAINTAINERCLEANFILES = $(BUILT_SOURCES) $(stamp_files)
96 97 98 99 100

# GObject Introspection
if HAVE_INTROSPECTION
-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_GIRS =
101
INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --warn-all
102 103
INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)

104
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
105
Poppler-0.18.gir: libpoppler-glib.la
106
Poppler_0_18_gir_INCLUDES = GObject-2.0 Gio-2.0 cairo-1.0
Albert Astals Cid's avatar
Albert Astals Cid committed
107
Poppler_0_18_gir_CFLAGS = $(INCLUDES) -I$(top_builddir)
108
Poppler_0_18_gir_LIBS = libpoppler-glib.la $(top_builddir)/poppler/libpoppler.la $(top_builddir)/poppler/libpoppler-cairo.la
109
Poppler_0_18_gir_FILES = $(introspection_files)
110 111
Poppler_0_18_gir_SCANNERFLAGS = --c-include poppler.h
Poppler_0_18_gir_EXPORT_PACKAGES = poppler-glib
112

Albert Astals Cid's avatar
Albert Astals Cid committed
113
INTROSPECTION_GIRS += Poppler-0.18.gir
114 115

girdir = $(datadir)/gir-1.0
Yaakov Selkowitz's avatar
Yaakov Selkowitz committed
116
gir_DATA = $(INTROSPECTION_GIRS)
117 118 119 120

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

Yaakov Selkowitz's avatar
Yaakov Selkowitz committed
121
CLEANFILES += $(gir_DATA) $(typelibs_DATA)
Albert Astals Cid's avatar
Albert Astals Cid committed
122
endif #HAVE_INTROSPECTION