summaryrefslogtreecommitdiff
path: root/src/Makefile.am
blob: d9ef0696d62f91e4bfac977b03fbe8e83dfe8c7e (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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
if ENABLE_JPEG
jpeg_LIB = $(top_builddir)/jpegutils/libeom-jpegutils.la
endif

toolbar_LIB = $(top_builddir)/cut-n-paste/toolbar-editor/libtoolbareditor.la

noinst_LTLIBRARIES = libeom.la

bin_PROGRAMS = eom

headerdir = $(prefix)/include/eom-@EOM_API_VERSION@/eom
header_DATA = $(INST_H_FILES)

MARSHAL_OUTPUT = 	\
	eom-marshal.h	\
	eom-marshal.c

NOINST_H_FILES =			\
	eom-session.h			\
	eom-util.h			\
	eom-pixbuf-util.h		\
	eom-preferences-dialog.h	\
	eom-config-keys.h		\
	eom-image-jpeg.h		\
	eom-image-private.h		\
	eom-metadata-sidebar.h		\
	eom-uri-converter.h		\
	eom-metadata-reader.h		\
	eom-metadata-reader-jpg.h	\
	eom-metadata-reader-png.h	\
	eom-save-as-dialog-helper.h	\
	eom-print-image-setup.h         \
	eom-print-preview.h             \
	eom-print.h			\
	eom-plugin-engine.h             \
	eom-close-confirmation-dialog.h	\
	zoom.h

INST_H_FILES =				\
	eom-application.h		\
	eom-debug.h			\
	eom-window.h			\
	eom-sidebar.h			\
	eom-dialog.h			\
	eom-properties-dialog.h		\
	eom-error-message-area.h	\
	eom-file-chooser.h		\
	eom-statusbar.h			\
	eom-thumb-nav.h			\
	eom-transform.h			\
	eom-image.h			\
	eom-enums.h			\
	eom-image-save-info.h		\
	eom-scroll-view.h		\
	eom-thumb-view.h		\
	eom-list-store.h		\
	eom-thumbnail.h			\
	eom-job-queue.h			\
	eom-clipboard-handler.h		\
	eom-jobs.h

libeom_c_files =			\
	eom-application.c		\
	eom-session.c			\
	eom-debug.c			\
	eom-util.c			\
	eom-pixbuf-util.c		\
	eom-window.c			\
	eom-sidebar.c			\
	eom-dialog.c			\
	eom-preferences-dialog.c	\
	eom-properties-dialog.c		\
	eom-error-message-area.c	\
	eom-file-chooser.c		\
	eom-statusbar.c			\
	eom-thumb-nav.c			\
	eom-transform.c			\
	eom-image.c			\
	eom-image-jpeg.c		\
	eom-image-save-info.c		\
	eom-scroll-view.c		\
	eom-thumb-view.c		\
	eom-list-store.c		\
	eom-metadata-sidebar.c	\
	eom-thumbnail.c			\
	eom-job-queue.c			\
	eom-jobs.c			\
	eom-uri-converter.c		\
	eom-metadata-reader.c		\
	eom-metadata-reader-jpg.c	\
	eom-metadata-reader-png.c	\
	eom-save-as-dialog-helper.c	\
	eom-print-image-setup.c         \
	eom-print-preview.c           	\
	eom-print.c			\
	eom-close-confirmation-dialog.c \
	eom-plugin-engine.c            	\
	eom-clipboard-handler.c		\
	zoom.c

libeom_la_SOURCES =			\
	$(libeom_c_files)		\
	$(BUILT_SOURCES)		\
	$(NOINST_H_FILES)		\
	$(INST_H_FILES)

if HAVE_EXIF
INST_H_FILES +=				\
	eom-exif-util.h			\
	eom-exif-details.h
libeom_c_files +=			\
	eom-exif-util.c			\
	eom-exif-details.c
endif

if HAVE_EXEMPI
# We need to make sure eom-exif-details.h
# is only listed once in INST_H_FILES
# or the build will break with automake-1.11
if !HAVE_EXIF
INST_H_FILES +=				\
	eom-exif-details.h
endif !HAVE_EXIF
libeom_la_SOURCES +=			\
	eom-exif-details.c
endif HAVE_EXEMPI

libeom_la_CPPFLAGS =						\
	-I$(top_srcdir)/jpegutils				\
	-I$(top_srcdir)/cut-n-paste/toolbar-editor		\
	-DG_LOG_DOMAIN=\"EOM\"					\
	-DEOM_DATA_DIR=\""$(pkgdatadir)"\"			\
	-DEOM_LOCALE_DIR=\""$(datadir)/locale"\"		\
	-DEOM_PLUGIN_DIR=\""$(libdir)/eom/plugins"\"		\
	-DLIBDIR=\""$(libdir)"\"

libeom_la_CFLAGS =						\
	$(EOM_CFLAGS)						\
	$(WARN_CFLAGS)

libeom_la_LIBADD = \
	$(EOM_LIBS)

if HAVE_LCMS
libeom_la_CFLAGS += 	\
	$(X11_CFLAGS)

libeom_la_LIBADD += \
	$(X11_LIBS)
endif

eom_SOURCES = main.c

eom_CFLAGS = 							\
	-I$(top_srcdir)/cut-n-paste/toolbar-editor		\
	$(EOM_CFLAGS)						\
	-DEOM_DATA_DIR=\""$(pkgdatadir)"\"			\
	-DEOM_LOCALE_DIR=\""$(datadir)/locale"\"		\
	$(INTROSPECTION_CFLAGS)

eom_LDADD = 				\
	libeom.la			\
	$(EOM_LIBS)			\
	$(LIBJPEG)			\
	$(toolbar_LIB)			\
	$(jpeg_LIB)			\
	$(INTROSPECTION_LIBS)

BUILT_SOURCES = 			\
	eom-enum-types.c		\
	eom-enum-types.h		\
	$(MARSHAL_OUTPUT)

eom-enum-types.h: eom-enum-types.h.template $(INST_H_FILES) $(GLIB_MKENUMS)
	$(AM_V_GEN)(cd $(srcdir) && $(GLIB_MKENUMS) --template eom-enum-types.h.template $(INST_H_FILES)) > $@

eom-enum-types.c: eom-enum-types.c.template $(INST_H_FILES) $(GLIB_MKENUMS)
	$(AM_V_GEN)(cd $(srcdir) && $(GLIB_MKENUMS) --template eom-enum-types.c.template $(INST_H_FILES)) > $@

eom-marshal.h: eom-marshal.list $(GLIB_GENMARSHAL)
	$(AM_V_GEN)$(GLIB_GENMARSHAL) $< --header --internal --prefix=eom_marshal > $@

eom-marshal.c: eom-marshal.list $(GLIB_GENMARSHAL)
	$(AM_V_GEN)$(GLIB_GENMARSHAL) $< --body --header --prefix=eom_marshal > $@

EXTRA_DIST = 				\
	eom-enum-types.h.template	\
	eom-enum-types.c.template	\
	eom-marshal.list

CLEANFILES = $(BUILT_SOURCES)

if HAVE_INTROSPECTION
-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_GIRS = Eom-1.0.gir
INTROSPECTION_SCANNER_ARGS = -I$(top_srcdir) --warn-all $(libeom_la_CPPFLAGS)

Eom-1.0.gir: eom
Eom_1_0_gir_INCLUDES = Gtk-3.0
Eom_1_0_gir_FILES = $(INST_H_FILES) $(libeom_c_files) $(BUILT_SOURCES)
Eom_1_0_gir_VERSION = 1.0
Eom_1_0_gir_PROGRAM = $(builddir)/eom
Eom_1_0_gir_NAMESPACE = Eom
Eom_1_0_gir_CFLAGS = $(EOM_CFLAGS)
girdir = $(datadir)/gir-1.0
gir_DATA = $(INTROSPECTION_GIRS)

typelibdir = $(libdir)/girepository-1.0
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)

CLEANFILES += $(gir_DATA) $(typelib_DATA)
endif

dist-hook:
	cd $(distdir); rm -f $(BUILT_SOURCES)

-include $(top_srcdir)/git.mk