Makefile.am 6.44 KB
Newer Older
Elliot Lee's avatar
Elliot Lee committed
1 2
## Process this file with automake to produce Makefile.in

3
libgimpbase = $(top_builddir)/libgimpbase/libgimpbase-$(GIMP_API_VERSION).la
4
libgimpconfig = $(top_builddir)/libgimpconfig/libgimpconfig-$(GIMP_API_VERSION).la
5 6 7 8 9 10
libgimpcolor = $(top_builddir)/libgimpcolor/libgimpcolor-$(GIMP_API_VERSION).la
libgimpmath = $(top_builddir)/libgimpmath/libgimpmath-$(GIMP_API_VERSION).la
libgimpmodule = $(top_builddir)/libgimpmodule/libgimpmodule-$(GIMP_API_VERSION).la
libgimpwidgets = $(top_builddir)/libgimpwidgets/libgimpwidgets-$(GIMP_API_VERSION).la
libgimpthumb = $(top_builddir)/libgimpthumb/libgimpthumb-$(GIMP_API_VERSION).la

11
# Sort this by architectural dependencies, lowest level at the top,
12 13
# so that when e.g. changing a header-file the subdirs are built in
# the right order
14
SUBDIRS = \
15 16
	config		\
	core		\
17
	operations	\
18 19
	gegl		\
	text		\
20 21
	vectors		\
	paint		\
22
	plug-in		\
23
	xcf		\
24 25 26
	file		\
	pdb		\
	widgets		\
27
	propgui		\
28 29 30 31 32 33
	display		\
	tools		\
	dialogs		\
	actions		\
	menus		\
	gui		\
34
	.		\
35
	tests
Elliot Lee's avatar
Elliot Lee committed
36

37 38 39 40
# Put the GIMP core in a lib so we can conveniently link against that
# in test cases
noinst_LIBRARIES = libapp.a

41
if ENABLE_GIMP_CONSOLE
42
bin_PROGRAMS = gimp-@GIMP_APP_VERSION@ gimp-console-@GIMP_APP_VERSION@
43
else
44
bin_PROGRAMS = gimp-@GIMP_APP_VERSION@
45
endif
Elliot Lee's avatar
Elliot Lee committed
46

47
libapp_sources = \
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
	about.h			\
	app.c			\
	app.h			\
	errors.c		\
	errors.h		\
	language.c		\
	language.h		\
	sanity.c		\
	sanity.h		\
	signals.c		\
	signals.h		\
	tests.c			\
	tests.h			\
	unique.c		\
	unique.h		\
	gimp-debug.c		\
	gimp-debug.h		\
65
	gimp-intl.h		\
66 67 68
	gimp-log.c		\
	gimp-log.h		\
	gimp-priorities.h	\
69 70
	gimp-version.c		\
	gimp-version.h
71

72
libapp_a_SOURCES = $(libapp_sources)
73

74
gimp_@GIMP_APP_VERSION@_SOURCES = $(libapp_sources) main.c
75

76

77
if PLATFORM_OSX
78
framework_cocoa = -framework Cocoa
79 80
endif

81
if OS_WIN32
82
win32_ldflags = -mwindows -Wl,--tsaware $(WIN32_LARGE_ADDRESS_AWARE)
83

84 85 86 87
# for GetProcessMemoryInfo() in the dashboard
psapi_cflags = -DPSAPI_VERSION=1
libpsapi = -lpsapi

88 89 90 91
if HAVE_EXCHNDL
exchndl = -lexchndl
endif

92 93
else
libm = -lm
94
endif
95

96
if USE_BINRELOC
97 98
munix = -Wl,-rpath '-Wl,$$ORIGIN/../lib'
endif
99

100
if HAVE_WINDRES
101
include $(top_srcdir)/build/windows/gimprc.rule
102 103
GIMPRC = gimp-$(GIMP_APP_VERSION).rc.o
GIMPCONSOLERC = gimp-console-$(GIMP_APP_VERSION).rc.o
104 105
endif

106
AM_CPPFLAGS = \
107 108 109 110 111 112 113 114 115 116 117 118 119
	-DGIMPDIR=\""$(gimpdir)"\"			\
	-DLIBEXECDIR=\""$(libexecdir)"\"		\
	-DGIMP_USER_VERSION=\"$(GIMP_USER_VERSION)\"	\
	-DGIMP_TOOL_VERSION=\"$(GIMP_TOOL_VERSION)\"	\
	-DG_LOG_DOMAIN=\"Gimp\"				\
	-DGIMP_APP_GLUE_COMPILATION			\
	-DCC_VERSION=\""$(CC_VERSION)"\"		\
	-I$(top_srcdir)					\
	$(GTK_CFLAGS)					\
	$(PANGOCAIRO_CFLAGS)				\
	$(GEGL_CFLAGS)					\
	$(LCMS_CFLAGS)					\
	$(GEXIV2_CFLAGS)				\
120
	$(psapi_cflags)					\
121
	-I$(includedir)					\
122
	-I$(builddir)/gui
Elliot Lee's avatar
Elliot Lee committed
123

124 125 126
# We need this due to circular dependencies
AM_LDFLAGS = \
	$(munix)						\
127 128 129
	-Wl,-u,$(SYMPREFIX)gimp_vectors_undo_get_type		\
	-Wl,-u,$(SYMPREFIX)gimp_vectors_mod_undo_get_type	\
	-Wl,-u,$(SYMPREFIX)gimp_param_spec_duplicate		\
130 131 132 133
	-Wl,-u,$(SYMPREFIX)gimp_operations_init			\
	-Wl,-u,$(SYMPREFIX)xcf_init				\
	-Wl,-u,$(SYMPREFIX)internal_procs_init			\
	-Wl,-u,$(SYMPREFIX)gimp_plug_in_manager_restore		\
134
	-Wl,-u,$(SYMPREFIX)gimp_pdb_compat_param_spec		\
Ell's avatar
Ell committed
135 136
	-Wl,-u,$(SYMPREFIX)gimp_layer_mode_is_legacy		\
	-Wl,-u,$(SYMPREFIX)gimp_parallel_init			\
Ell's avatar
Ell committed
137
	-Wl,-u,$(SYMPREFIX)gimp_async_set_new			\
138
	-Wl,-u,$(SYMPREFIX)gimp_uncancelable_waitable_new
139 140

gimpconsoleldadd = \
141 142 143 144 145 146 147 148 149
	xcf/libappxcf.a						\
	pdb/libappinternal-procs.a				\
	pdb/libapppdb.a						\
	plug-in/libappplug-in.a					\
	vectors/libappvectors.a					\
	core/libappcore.a					\
	file/libappfile.a					\
	text/libapptext.a					\
	paint/libapppaint.a					\
Ell's avatar
Ell committed
150
	operations/libappoperations.a				\
151 152 153 154 155 156 157 158 159 160
	operations/layer-modes/libapplayermodes.a		\
	operations/layer-modes-legacy/libapplayermodeslegacy.a	\
	gegl/libappgegl.a					\
	config/libappconfig.a					\
	$(libgimpconfig)					\
	$(libgimpmath)						\
	$(libgimpthumb)						\
	$(libgimpcolor)						\
	$(libgimpmodule)					\
	$(libgimpbase)						\
161
	$(APPSTREAM_GLIB_LIBS)					\
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
	$(GDK_PIXBUF_LIBS)					\
	$(FREETYPE_LIBS)					\
	$(FONTCONFIG_LIBS)					\
	$(PANGOCAIRO_LIBS)					\
	$(HARFBUZZ_LIBS)					\
	$(CAIRO_LIBS)						\
	$(GIO_UNIX_LIBS)					\
	$(GIO_WINDOWS_LIBS)					\
	$(GEGL_LIBS)						\
	$(GLIB_LIBS)						\
	$(LCMS_LIBS)						\
	$(GEXIV2_LIBS)						\
	$(Z_LIBS)						\
	$(JSON_C_LIBS)						\
	$(LIBMYPAINT_LIBS)					\
	$(INTLLIBS)						\
	$(RT_LIBS)						\
179
	$(libm)
180

181
gimp_@GIMP_APP_VERSION@_LDFLAGS = \
182 183 184 185 186
	$(AM_LDFLAGS)						\
	$(win32_ldflags)					\
	$(framework_cocoa)					\
	-Wl,-u,$(SYMPREFIX)gimp_lebl_dialog			\
	-Wl,-u,$(SYMPREFIX)gimp_core_pixbufs_get_resource	\
187 188
	-Wl,-u,$(SYMPREFIX)gimp_tool_cursors_get_resource

189

190
gimp_@GIMP_APP_VERSION@_LDADD = \
191 192 193 194 195 196
	gui/libappgui.a			\
	menus/libappmenus.a		\
	actions/libappactions.a		\
	dialogs/libappdialogs.a		\
	tools/libapptools.a		\
	display/libappdisplay.a		\
197
	propgui/libapppropgui.a		\
198 199 200 201 202 203
	widgets/libappwidgets.a		\
	$(libgimpwidgets)		\
	$(GTK_LIBS)			\
	$(GTK_MAC_INTEGRATION_LIBS)	\
	$(DBUS_GLIB_LIBS)		\
	$(gimpconsoleldadd)		\
204
	$(libpsapi)			\
205
	$(exchndl)			\
206
	$(GIMPRC)
207

208

209
if ENABLE_GIMP_CONSOLE
210

211
gimp_console_@GIMP_APP_VERSION@_SOURCES = $(libapp_sources) main.c
212

213
gimp_console_@GIMP_APP_VERSION@_CPPFLAGS = \
214 215 216
	$(AM_CPPFLAGS)			\
	-DGIMP_CONSOLE_COMPILATION

217
gimp_console_@GIMP_APP_VERSION@_LDADD = \
218 219
	$(gimpconsoleldadd) \
	$(GIMPCONSOLERC)
220

221 222
endif

223

224 225 226
install-exec-hook:
if DEFAULT_BINARY
	cd $(DESTDIR)$(bindir) \
227
	&& rm -f gimp$(EXEEXT) \
228
	&& $(LN_S) gimp-$(GIMP_APP_VERSION)$(EXEEXT) gimp$(EXEEXT)
229 230 231
if ENABLE_GIMP_CONSOLE
	cd $(DESTDIR)$(bindir) \
	&& rm -f gimp-console$(EXEEXT) \
232
	&& $(LN_S) gimp-console-$(GIMP_APP_VERSION)$(EXEEXT) gimp-console$(EXEEXT)
233
endif
234 235 236 237
endif

uninstall-local:
if DEFAULT_BINARY
238
	rm -f $(DESTDIR)$(bindir)/gimp$(EXEEXT)
239
if ENABLE_GIMP_CONSOLE
240
	rm -f $(DESTDIR)$(bindir)/gimp-console$(EXEEXT)
241
endif
242
endif
243 244


245 246 247 248 249 250 251 252 253
# require gimp-console when making dist
#
if ENABLE_GIMP_CONSOLE
dist-check-gimp-console:
else
dist-check-gimp-console:
	@echo "*** gimp-console must be enabled in order to make dist"
	@false
endif
254

255 256 257 258 259

# hook to assure that the system gimprc and the gimprc manpage are
# uptodate when a release is made
#
dist-dump-gimprc: gimp-console-$(GIMP_APP_VERSION)$(EXEEXT)
260
	./$< --dump-gimprc-system > gimprc.tmp	\
261 262 263
		&& (cmp -s gimprc.tmp $(top_srcdir)/etc/gimprc.in ||	\
		    cp gimprc.tmp $(top_srcdir)/etc/gimprc.in)		\
		&& rm gimprc.tmp
264
	./$< --dump-gimprc-manpage > gimprc.tmp	\
265 266 267
		&& (cmp -s gimprc.tmp $(top_srcdir)/docs/gimprc.5.in ||\
		    cp gimprc.tmp $(top_srcdir)/docs/gimprc.5.in)	\
		&& rm gimprc.tmp
268 269

dist-hook: dist-check-gimp-console dist-dump-gimprc