Makefile.am 6.7 KB
Newer Older
1
## Previewer
2
include $(top_srcdir)/glade-rules.mk
3 4

bin_PROGRAMS = glade-previewer
5
lib_LTLIBRARIES = libgladeui-2.la
6 7 8 9

glade_previewer_CPPFLAGS = \
	-I$(top_srcdir)    \
	-I$(top_builddir)  \
10
	-DGLADE_GNOMEHELPDIR="\"$(HELP_DIR)\"" \
11
	$(GTK_CFLAGS)      \
12
	$(GTK_MAC_CFLAGS)  \
13
	$(WARN_CFLAGS)     \
14 15 16
	$(AM_CPPFLAGS)

glade_previewer_CFLAGS =   \
17 18 19 20
	$(AM_CFLAGS)

glade_previewer_LDFLAGS = $(AM_LDFLAGS)

21
glade_previewer_LDADD = libgladeui-2.la $(GTK_MAC_LIBS)
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36

glade_previewer_SOURCES = \
	glade-previewer.c

if NATIVE_WIN32
glade_previewer_LDADD += glade-win32-res.o
if !GLADE_UNSTABLE
glade_previewer_LDFLAGS += -mwindows
endif
endif

glade-win32-res.o: glade-previewer.rc
	$(WINDRES) $< $@

## Rest of the UI ;)
37 38

common_defines = \
39
	-DG_LOG_DOMAIN=\"GladeUI\"                      \
40 41 42
	-DGLADE_CATALOGSDIR="\"$(pkgdatadir)/catalogs\""\
	-DGLADE_MODULESDIR="\"$(pkglibdir)/modules\""	\
	-DGLADE_PIXMAPSDIR="\"$(pkgdatadir)/pixmaps\""	\
43
	-DGLADE_LOCALEDIR="\"$(datadir)/locale\""\
44 45
	-DGLADE_BINDIR="\"$(bindir)\""\
	-DGLADE_LIBDIR="\"$(libdir)\""
46

47 48 49 50
BUILT_SOURCES = \
	glade-marshallers.c \
	glade-marshallers.h \
	gladeui-resources.c \
51 52 53 54
	gladeui-resources.h \
	gladeui-enum-types.c \
	gladeui-enum-types.h

55

56 57 58
UI_FILES = 				\
	glade-editor.ui			\
	glade-project-properties.ui	\
59
	glade-property-label.ui
60

61 62 63 64 65 66 67 68 69 70 71
GRAPHICS_FILES = \
	atk.png


EXTRA_DIST = 			\
	$(UI_FILES)		\
	$(GRAPHICS_FILES)	\
	glade-marshallers.list 	\
	gladeui.rc.in 		\
	icon-naming-spec.c 	\
	glade-previewer.rc.in 	\
72 73 74 75
	gladeui-resources.gresource.xml \
	gladeui-enum-types.c.template	\
	gladeui-enum-types.h.template

76

77
# The glade core library
78
libgladeui_2_la_SOURCES = \
79 80 81
	$(BUILT_SOURCES)	\
	glade-accumulators.c \
	glade-app.c \
82
	glade-base-editor.c \
83 84 85 86 87 88 89
	glade-builtins.c \
	glade-catalog.c \
	glade-cell-renderer-icon.c \
	glade-clipboard.c \
	glade-command.c \
	glade-cursor.c \
	glade-debug.c \
90 91
	glade-design-layout.c \
	glade-design-view.c \
92 93 94 95
	glade-displayable-values.c \
	glade-editable.c \
	glade-editor.c \
	glade-editor-property.c \
96
	glade-editor-skeleton.c \
97
	glade-editor-table.c \
98 99
	glade-id-allocator.c \
	glade-id-allocator.h \
100 101 102
	glade-object-stub.c \
	glade-inspector.c \
	glade-name-context.c \
103 104
	glade-named-icon-chooser-dialog.c \
	glade-named-icon-chooser-dialog.h \
105 106
	glade-palette.c \
	glade-placeholder.c \
107
	glade-popup.c \
108 109 110 111 112
	glade-preview.c	\
	glade-project.c \
	glade-property.c \
	glade-property-class.c \
	glade-property-label.c \
113
	glade-property-shell.c \
114 115 116
	glade-signal.c \
	glade-signal-class.c \
	glade-signal-editor.c \
117
	glade-signal-model.c \
118 119 120 121 122
	glade-utils.c \
	glade-widget.c \
	glade-widget-action.c \
	glade-widget-adaptor.c \
	glade-xml-utils.c
123

124
libgladeui_2_la_CPPFLAGS =  \
125 126 127 128
	$(common_defines)   \
	-I$(top_srcdir)     \
	-I$(top_builddir)   \
	$(GTK_CFLAGS)       \
129 130
	$(GTK_MAC_BUNDLE_FLAG) \
	$(GTK_MAC_CFLAGS)  \
131
	$(WARN_CFLAGS)      \
132 133
	$(AM_CPPFLAGS)

134
libgladeui_2_la_CFLAGS =    \
135 136
	$(AM_CFLAGS)

137
libgladeui_2_la_LDFLAGS = -version-info $(GLADE_CURRENT):$(GLADE_REVISION):$(GLADE_AGE) $(AM_LDFLAGS)
138
libgladeui_2_la_LIBADD = $(GTK_LIBS) $(GTK_MAC_LIBS)
139

140
libgladeuiincludedir=$(includedir)/libgladeui-2.0/gladeui
141 142
libgladeuiinclude_HEADERS = \
	glade.h \
143 144 145 146 147 148 149 150
	glade-app.h \
	glade-base-editor.h \
	glade-builtins.h \
	glade-catalog.h \
	glade-cell-renderer-icon.h \
	glade-clipboard.h \
	glade-command.h \
	glade-cursor.h \
151
	glade-debug.h \
152 153 154
	glade-design-view.h \
	glade-displayable-values.h \
	glade-editable.h \
155 156
	glade-editor.h \
	glade-editor-property.h \
157
	glade-editor-skeleton.h \
158 159 160
	glade-editor-table.h \
	glade-inspector.h \
	glade-name-context.h \
161
	glade-palette.h \
162 163
	glade-placeholder.h \
	glade-project.h \
164 165
	glade-property.h \
	glade-property-class.h \
166
	glade-property-label.h \
167
	glade-property-shell.h \
168
	glade-signal.h \
169
	glade-signal-class.h \
170 171 172 173
	glade-signal-editor.h \
	glade-signal-model.h \
	glade-utils.h \
	glade-widget.h \
174
	glade-widget-action.h \
175 176
	glade-widget-adaptor.h \
	glade-xml-utils.h
177

178
noinst_HEADERS = \
179
	gladeui-resources.h \
180
	glade-marshallers.h \
181
	glade-design-layout.h \
182
	glade-object-stub.h \
183 184
	glade-popup.h \
	glade-accumulators.h \
185
	glade-design-private.h \
186
	glade-preview-tokens.h \
187
	glade-preview.h \
188
	glade-path.h
189

190
if PLATFORM_WIN32
191
libgladeui_2_la_LDFLAGS += -no-undefined
192 193 194
endif

if NATIVE_WIN32
195
# gmodule-export-2.0 on windows does not include -export-dynamic flag
196 197
libgladeui_2_la_LDFLAGS += \
	-Wl,gladeui-win32-res.o \
198
	-export-dynamic
199
libgladeui_2_la_DEPENDENCIES = gladeui-win32-res.o
200 201
endif

202 203 204
gladeui-win32-res.o: gladeui.rc
	$(WINDRES) $< $@

205 206 207 208
#
# Marshaller generation
#
glade-marshallers.h: glade-marshallers.list $(GLIB_GENMARSHAL)
209
	$(GLIB_GENMARSHAL) --prefix=_glade_marshal $(srcdir)/glade-marshallers.list --header > glade-marshallers-h.tmp \
210 211 212
	&& mv glade-marshallers-h.tmp glade-marshallers.h \
	|| ( rm -f glade-marshallers-h.tmp && exit 1)
glade-marshallers.c: glade-marshallers.list $(GLIB_GENMARSHAL)
213
	$(GLIB_GENMARSHAL) --prefix=_glade_marshal $(srcdir)/glade-marshallers.list --body --header > glade-marshallers-c.tmp     \
214 215
	&& mv glade-marshallers-c.tmp glade-marshallers.c \
	|| ( rm -f glade-marshallers-c.tmp && exit 1 )
216

217 218 219 220 221 222 223 224 225 226 227
#
# Enum type generation
#
gladeui-enum-types.h: gladeui-enum-types.h.template $(libgladeuiinclude_HEADERS) $(GLIB_MKENUMS)
	$(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) --template $@.template \
	$(libgladeuiinclude_HEADERS)) > $@

gladeui-enum-types.c: gladeui-enum-types.c.template $(libgladeuiinclude_HEADERS) $(GLIB_MKENUMS)
	$(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) --template $@.template \
	$(libgladeuiinclude_HEADERS)) > $@

228
CLEANFILES = $(BUILT_SOURCES)
229 230 231 232 233 234 235 236 237 238 239

#
# Introspection generation
#

-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_GIRS =
INTROSPECTION_SCANNER_ARGS = \
	--add-include-path=$(srcdir) \
	--identifier-prefix=Glade \
	--symbol-prefix=glade \
240
	--pkg=gtk+-3.0 -I../ -I$(srcdir)/..
241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261

INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)

if HAVE_INTROSPECTION
introspection_sources = $(libgladeui_2_la_SOURCES) $(libgladeuiinclude_HEADERS)

Gladeui-2.0.gir: libgladeui-2.la
Gladeui_2_0_gir_INCLUDES = Gtk-3.0
Gladeui_2_0_gir_CFLAGS = $(INCLUDES)
Gladeui_2_0_gir_LIBS = libgladeui-2.la
Gladeui_2_0_gir_FILES = $(introspection_sources)
INTROSPECTION_GIRS += Gladeui-2.0.gir

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
262

263
# Generate resources
264
gladeui-resources.h: gladeui-resources.gresource.xml $(UI_FILES) $(GRAPHICS_FILES)
265 266
	$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/gladeui-resources.gresource.xml \
		--target=$@ --sourcedir=$(srcdir) --c-name _gladeui --generate-header
267
gladeui-resources.c: gladeui-resources.gresource.xml $(UI_FILES) $(GRAPHICS_FILES)
268 269
	$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/gladeui-resources.gresource.xml \
		--target=$@ --sourcedir=$(srcdir) --c-name _gladeui --generate-source