summaryrefslogtreecommitdiff
path: root/perf/Makefile.am
blob: 96ac157d037040a84fe5354b28f9a2500fe1f5a4 (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
## Makefile.am for gtk+/perf

INCLUDES =					\
	-I$(top_srcdir)				\
	-I$(top_builddir)/gdk			\
	-I$(top_srcdir)/gdk			\
	-DG_DISABLE_DEPRECATED			\
	-DGDK_PIXBUF_DISABLE_DEPRECATED		\
	-DGDK_DISABLE_DEPRECATED		\
	-DGTK_DISABLE_DEPRECATED		\
	$(GTK_DEBUG_FLAGS)			\
	$(GTK_DEP_CFLAGS)

DEPS =									\
	$(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la	\
	$(top_builddir)/gdk/$(gdktargetlib)				\
	$(top_builddir)/gtk/$(gtktargetlib)

LDADDS =								\
	$(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la	\
	$(top_builddir)/gdk/$(gdktargetlib)				\
	$(top_builddir)/gtk/$(gtktargetlib)

noinst_PROGRAMS	= 	\
	testperf

testperf_DEPENDENCIES = $(TEST_DEPS)

testperf_LDADD = $(LDADDS)

testperf_SOURCES =		\
	appwindow.c		\
	gtkwidgetprofiler.c	\
	gtkwidgetprofiler.h	\
	main.c			\
	marshalers.c		\
	marshalers.h		\
	textview.c		\
	treeview.c		\
	typebuiltins.c		\
	typebuiltins.h		\
	widgets.h

BUILT_SOURCES =			\
	marshalers.c		\
	marshalers.h		\
	typebuiltins.c		\
	typebuiltins.h

stamp_files =			\
	stamp-marshalers.h	\
	stamp-typebuiltins.h

headers_with_enums = 		\
	gtkwidgetprofiler.h

MAINTAINERCLEANFILES = $(BUILT_SOURCES) $(stamp_files)

marshalers.h: stamp-marshalers.h
	@true

stamp-marshalers.h: @REBUILD@ marshalers.list
	$(GLIB_GENMARSHAL) --prefix=_gtk_marshal $(srcdir)/marshalers.list --header >> xgen-gmlh \
	&& (cmp -s xgen-gmlh marshalers.h || cp xgen-gmlh marshalers.h) \
	&& rm -f xgen-gmlh \
	&& echo timestamp > $(@F)	
marshalers.c: @REBUILD@ marshalers.list
	$(GLIB_GENMARSHAL) --prefix=_gtk_marshal $(srcdir)/marshalers.list --body >> xgen-gmlc \
	&& cp xgen-gmlc marshalers.c \
	&& rm -f xgen-gmlc

typebuiltins.h: stamp-typebuiltins.h
	@true
stamp-typebuiltins.h: @REBUILD@ $(headers_with_enums) Makefile
	( cd $(srcdir) && glib-mkenums \
			--fhead "#ifndef __TYPE_BUILTINS_H__\n#define __TYPE_BUILTINS_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
			--fprod "/* enumerations from \"@filename@\" */\n" \
			--vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define GTK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
			--ftail "G_END_DECLS\n\n#endif /* __TYPE_BUILTINS_H__ */" \
		$(headers_with_enums) ) >> xgen-gtbh \
	&& (cmp -s xgen-gtbh typebuiltins.h || cp xgen-gtbh typebuiltins.h ) \
	&& rm -f xgen-gtbh \
	&& echo timestamp > $(@F)
typebuiltins.c: @REBUILD@ $(headers_with_enums) Makefile
	( cd $(srcdir) && glib-mkenums \
			--fhead "#include \"gtkwidgetprofiler.h\"" \
			--ftail "#define __TYPE_BUILTINS_C__\n" \
			--fprod "\n/* enumerations from \"@filename@\" */" \
			--vhead "GType\n@enum_name@_get_type (void)\n{\n  static GType etype = 0;\n  if (etype == 0) {\n    static const G@Type@Value values[] = {" \
			--vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
			--vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
		$(headers_with_enums) ) > xgen-gtbc \
	&& cp xgen-gtbc typebuiltins.c  \
	&& rm -f xgen-gtbc


EXTRA_DIST = 		\
	README		\
	marshalers.list	\
	$(BUILT_SOURCES)

# if srcdir!=builddir, clean out maintainer-clean files from builddir
# this allows dist to pass.
distclean-local:
	if test $(srcdir) != .; then \
	  rm -f $(MAINTAINERCLEANFILES); \
	fi