Makefile.am 6.84 KB
Newer Older
1 2
## Process this file with automake to produce Makefile.in

3 4
if PLATFORM_OSX
xobjective_c = "-xobjective-c"
5 6
xobjective_cxx = "-xobjective-c++"
xnone = "-xnone"
7 8
endif

9
AM_CPPFLAGS = \
10 11 12 13 14 15 16
	-DG_LOG_DOMAIN=\"Gimp-Display\"	\
	-I$(top_builddir)		\
	-I$(top_srcdir)			\
	-I$(top_builddir)/app		\
	-I$(top_srcdir)/app		\
	$(GEGL_CFLAGS)			\
	$(GTK_CFLAGS)			\
17 18 19
	-I$(includedir)

AM_CFLAGS = \
20
	$(xobjective_c)
21

22 23 24 25 26 27
AM_CXXFLAGS = \
	$(xobjective_cxx)

AM_LDFLAGS = \
	$(xnone)

28 29
noinst_LIBRARIES = libappdisplay.a

30
libappdisplay_a_sources = \
31
	display-enums.h				\
32
	display-types.h				\
33 34
	gimpcanvas.c				\
	gimpcanvas.h				\
35 36
	gimpcanvas-style.c			\
	gimpcanvas-style.h			\
37 38
	gimpcanvasarc.c				\
	gimpcanvasarc.h				\
39 40
	gimpcanvasboundary.c			\
	gimpcanvasboundary.h			\
41 42
	gimpcanvasbufferpreview.c		\
	gimpcanvasbufferpreview.h		\
43 44
	gimpcanvascorner.c			\
	gimpcanvascorner.h			\
45 46
	gimpcanvascursor.c			\
	gimpcanvascursor.h			\
47 48
	gimpcanvasgrid.c			\
	gimpcanvasgrid.h			\
49 50
	gimpcanvasgroup.c			\
	gimpcanvasgroup.h			\
51 52
	gimpcanvasguide.c			\
	gimpcanvasguide.h			\
53 54
	gimpcanvashandle.c			\
	gimpcanvashandle.h			\
55 56
	gimpcanvasitem.c			\
	gimpcanvasitem.h			\
57 58
	gimpcanvasitem-utils.c			\
	gimpcanvasitem-utils.h			\
59 60
	gimpcanvaslayerboundary.c		\
	gimpcanvaslayerboundary.h		\
61 62
	gimpcanvasline.c			\
	gimpcanvasline.h			\
63 64
	gimpcanvaspassepartout.c		\
	gimpcanvaspassepartout.h		\
65 66
	gimpcanvaspath.c			\
	gimpcanvaspath.h			\
67 68
	gimpcanvaspen.c				\
	gimpcanvaspen.h				\
69 70
	gimpcanvaspolygon.c			\
	gimpcanvaspolygon.h			\
71 72
	gimpcanvasprogress.c			\
	gimpcanvasprogress.h			\
73 74
	gimpcanvasproxygroup.c			\
	gimpcanvasproxygroup.h			\
75 76
	gimpcanvasrectangle.c			\
	gimpcanvasrectangle.h			\
77 78
	gimpcanvasrectangleguides.c		\
	gimpcanvasrectangleguides.h		\
79 80
	gimpcanvassamplepoint.c			\
	gimpcanvassamplepoint.h			\
81 82
	gimpcanvastextcursor.c			\
	gimpcanvastextcursor.h			\
83 84
	gimpcanvastransformguides.c		\
	gimpcanvastransformguides.h		\
85 86
	gimpcanvastransformpreview.c		\
	gimpcanvastransformpreview.h		\
87 88
	gimpcursorview.c			\
	gimpcursorview.h			\
89 90 91 92 93 94 95 96
	gimpdisplay.c				\
	gimpdisplay.h				\
	gimpdisplay-foreach.c			\
	gimpdisplay-foreach.h			\
	gimpdisplay-handlers.c			\
	gimpdisplay-handlers.h			\
	gimpdisplayshell.c			\
	gimpdisplayshell.h			\
97 98
	gimpdisplayshell-actions.c		\
	gimpdisplayshell-actions.h		\
99 100
	gimpdisplayshell-appearance.c		\
	gimpdisplayshell-appearance.h		\
101 102
	gimpdisplayshell-autoscroll.c		\
	gimpdisplayshell-autoscroll.h		\
103 104
	gimpdisplayshell-callbacks.c		\
	gimpdisplayshell-callbacks.h		\
105 106
	gimpdisplayshell-close.c		\
	gimpdisplayshell-close.h		\
107 108
	gimpdisplayshell-cursor.c		\
	gimpdisplayshell-cursor.h		\
109 110
	gimpdisplayshell-dnd.c			\
	gimpdisplayshell-dnd.h			\
111 112
	gimpdisplayshell-draw.c			\
	gimpdisplayshell-draw.h			\
113 114
	gimpdisplayshell-expose.c		\
	gimpdisplayshell-expose.h		\
115 116
	gimpdisplayshell-grab.c			\
	gimpdisplayshell-grab.h			\
117 118
	gimpdisplayshell-handlers.c		\
	gimpdisplayshell-handlers.h		\
119 120 121 122
	gimpdisplayshell-filter.c		\
	gimpdisplayshell-filter.h		\
	gimpdisplayshell-filter-dialog.c	\
	gimpdisplayshell-filter-dialog.h	\
123 124
	gimpdisplayshell-layer-select.c		\
	gimpdisplayshell-layer-select.h		\
125 126
	gimpdisplayshell-icon.c			\
	gimpdisplayshell-icon.h			\
127 128
	gimpdisplayshell-items.c		\
	gimpdisplayshell-items.h		\
129 130
	gimpdisplayshell-profile.c		\
	gimpdisplayshell-profile.h		\
131 132
	gimpdisplayshell-progress.c		\
	gimpdisplayshell-progress.h		\
133 134
	gimpdisplayshell-render.c		\
	gimpdisplayshell-render.h		\
135 136
	gimpdisplayshell-rotate.c		\
	gimpdisplayshell-rotate.h		\
137 138
	gimpdisplayshell-rotate-dialog.c	\
	gimpdisplayshell-rotate-dialog.h	\
139 140
	gimpdisplayshell-rulers.c		\
	gimpdisplayshell-rulers.h		\
141 142
	gimpdisplayshell-scale.c		\
	gimpdisplayshell-scale.h		\
143 144
	gimpdisplayshell-scale-dialog.c		\
	gimpdisplayshell-scale-dialog.h		\
145 146
	gimpdisplayshell-scroll.c		\
	gimpdisplayshell-scroll.h		\
147 148
	gimpdisplayshell-scrollbars.c		\
	gimpdisplayshell-scrollbars.h		\
149 150
	gimpdisplayshell-selection.c		\
	gimpdisplayshell-selection.h		\
151 152
	gimpdisplayshell-title.c		\
	gimpdisplayshell-title.h		\
153 154
	gimpdisplayshell-tool-events.c		\
	gimpdisplayshell-tool-events.h		\
155 156
	gimpdisplayshell-transform.c		\
	gimpdisplayshell-transform.h		\
157 158
	gimpdisplayshell-utils.c		\
	gimpdisplayshell-utils.h		\
159 160
	gimpdisplayxfer.c			\
	gimpdisplayxfer.h			\
161 162
	gimpimagewindow.c			\
	gimpimagewindow.h			\
163 164
	gimpmotionbuffer.c			\
	gimpmotionbuffer.h			\
165 166
	gimpmultiwindowstrategy.c		\
	gimpmultiwindowstrategy.h		\
167 168
	gimpnavigationeditor.c			\
	gimpnavigationeditor.h			\
169 170
	gimpscalecombobox.c			\
	gimpscalecombobox.h			\
171 172
	gimpsinglewindowstrategy.c		\
	gimpsinglewindowstrategy.h		\
173
	gimpstatusbar.c				\
174 175
	gimpstatusbar.h				\
	gimptooldialog.c			\
176 177
	gimptooldialog.h			\
	gimptoolgui.c				\
178
	gimptoolgui.h				\
179 180
	gimptoolcompass.c			\
	gimptoolcompass.h			\
Ell's avatar
Ell committed
181 182
	gimptoolgyroscope.c			\
	gimptoolgyroscope.h			\
183 184
	gimptoolhandlegrid.c			\
	gimptoolhandlegrid.h			\
185 186
	gimptoolline.c				\
	gimptoolline.h				\
187 188
	gimptoolpath.c				\
	gimptoolpath.h				\
189 190
	gimptoolpolygon.c			\
	gimptoolpolygon.h			\
191 192
	gimptoolrectangle.c			\
	gimptoolrectangle.h			\
193 194 195 196 197 198
	gimptoolrotategrid.c			\
	gimptoolrotategrid.h			\
	gimptoolsheargrid.c			\
	gimptoolsheargrid.h			\
	gimptooltransformgrid.c			\
	gimptooltransformgrid.h			\
199 200
	gimptoolwidget.c			\
	gimptoolwidget.h
201

202
libappdisplay_a_built_sources = display-enums.c
203

204 205 206 207 208 209 210
libappdisplay_a_SOURCES = \
	$(libappdisplay_a_built_sources)	\
	$(libappdisplay_a_sources)

#
# rules to generate built sources
#
211
# setup autogeneration dependencies
212 213 214
gen_sources = xgen-dec
CLEANFILES = $(gen_sources)

215
xgen-dec: $(srcdir)/display-enums.h $(GIMP_MKENUMS) Makefile.am
216
	$(AM_V_GEN) $(GIMP_MKENUMS) \
217
		--fhead "#include \"config.h\"\n#include <gio/gio.h>\n#include \"libgimpbase/gimpbase.h\"\n#include \"display-enums.h\"\n#include\"gimp-intl.h\"" \
218
		--fprod "\n/* enumerations from \"@basename@\" */" \
219
		--vhead "GType\n@enum_name@_get_type (void)\n{\n  static const G@Type@Value values[] =\n  {" \
220 221 222
		--vprod "    { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
		--vtail "    { 0, NULL, NULL }\n  };\n" \
		--dhead "  static const Gimp@Type@Desc descs[] =\n  {" \
223
		--dprod "    { @VALUENAME@, @valuedesc@, @valuehelp@ },@if ('@valueabbrev@' ne 'NULL')@\n    /* Translators: this is an abbreviated version of @valueudesc@.\n       Keep it short. */\n    { @VALUENAME@, @valueabbrev@, NULL },@endif@" \
224
		--dtail "    { 0, NULL, NULL }\n  };\n\n  static GType type = 0;\n\n  if (G_UNLIKELY (! type))\n    {\n      type = g_@type@_register_static (\"@EnumName@\", values);\n      gimp_type_set_translation_context (type, \"@enumnick@\");\n      gimp_@type@_set_value_descriptions (type, descs);\n    }\n\n  return type;\n}\n" \
225
		$< > $@
226

227 228 229 230
# copy the generated enum file back to the source directory only if it's
# changed; otherwise, only update its timestamp, so that the recipe isn't
# executed again on the next build, however, allow this to (harmlessly) fail,
# to support building from a read-only source tree.
231 232 233 234 235 236 237
$(srcdir)/display-enums.c: xgen-dec
	$(AM_V_GEN) if ! cmp -s $< $@; then \
		cp $< $@; \
	else \
		touch $@ 2> /dev/null \
		|| true; \
	fi