~indicator-multiload/indicator-multiload/stable

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
SUBDIRS = po

# general stuff

AM_CPPFLAGS = \
	-DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \
	-DPACKAGE_DATA_DIR=\""$(pkgdatadir)"\" \
	$(MULTILOADDEPS_CFLAGS) \
	-include $(CONFIG_HEADER)

AM_CFLAGS = -Wall \
           -Wno-unused-but-set-variable \
           -Wno-unused-variable \
           -Wno-unused-function \
           -Wno-missing-braces

VALAFLAGS =  \
	--pkg=posix \
	--pkg=gtk+-3.0 \
	--pkg=cairo \
	--pkg=appindicator3-0.1 \
	--pkg=glib-2.0 \
	--pkg=gio-unix-2.0 \
	--pkg=gmodule-2.0 \
	--enable-checking

@INTLTOOL_DESKTOP_RULE@
@INTLTOOL_XML_NOMERGE_RULE@
@GSETTINGS_RULES@

# the indicator

bin_PROGRAMS = indicator-multiload

indicator_multiload_VALASOURCES = \
	src/advpreferences.vala \
	src/appindicatorview.vala \
	src/colormapper.vala \
	src/cpufreqprovider.vala \
	src/cpuprovider.vala \
	src/diskprovider.vala \
	src/expressionparser.vala \
	src/function.vala \
	src/graphmodels.vala \
	src/graphmodel.vala \
	src/indicator.vala \
	src/indicatorview.vala \
	src/itemhelp.vala \
	src/itempreferences.vala \
	src/loadprovider.vala \
	src/main.vala \
	src/memprovider.vala \
	src/menumodel.vala \
	src/netprovider.vala \
	src/preferences.vala \
	src/providers.vala \
	src/provider.vala \
	src/reaper.vala \
	src/settingscache.vala \
	src/settingsconversion.vala \
	src/swapprovider.vala \
	src/tracemodel.vala \
	src/trayindicatorview.vala \
	src/utils.vala

indicator_multiload_SOURCES = \
	$(indicator_multiload_VALASOURCES) \
	src/config.vapi \
	src/gtop.vapi \
	src/various.vapi

indicator_multiload_LDFLAGS = \
	-Wl,--export-dynamic -Wl,--as-needed

indicator_multiload_LDADD = $(MULTILOADDEPS_LIBS) -lm

# documentation

multiloaddocdir = ${datadir}/doc/indicator-multiload
multiloaddoc_DATA = \
	COPYING \
	AUTHORS \
	TODO \
	HACKING

# gui

uidir = $(pkgdatadir)
nodist_ui_DATA = data/preferences.ui

# desktop file

desktopdir = $(datadir)/applications
desktop_in_files = data/indicator-multiload.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)

# gsettings schema

gsettings_SCHEMAS = data/de.mh21.indicator-multiload.gschema.xml

# clean and dist

CLEANFILES = \
	$(desktop_DATA) \
	$(gsettings_SCHEMAS)

DISTCLEANFILES = \
	$(indicator_multiload_VALASOURCES:.vala=.c) indicator_multiload_vala.stamp

EXTRA_DIST = \
	$(multiloaddoc_DATA) \
	$(desktop_in_files) \
	data/preferences.ui.in \
	data/de.mh21.indicator-multiload.gschema.xml.in.in \
	autogen.sh

uninstall-hook:
	-rmdir $(multiloaddocdir) $(pkgdatadir)

# run targets

test-run: all
	-rm -rf local-xdg-data-dir
	-mkdir -p local-xdg-data-dir/glib-2.0/schemas local-xdg-data-dir/indicator-multiload
	-ln -s ../../../data/de.mh21.indicator-multiload.gschema.xml local-xdg-data-dir/glib-2.0/schemas
	-ln -s ../../data/preferences.ui local-xdg-data-dir/indicator-multiload
	-glib-compile-schemas local-xdg-data-dir/glib-2.0/schemas
	-XDG_DATA_DIRS=./local-xdg-data-dir:$$XDG_DATA_DIRS G_SLICE=always-malloc ./indicator-multiload
	-rm -rf local-xdg-data-dir

test-verbose: all
	-rm -rf local-xdg-data-dir
	-mkdir -p local-xdg-data-dir/glib-2.0/schemas local-xdg-data-dir/indicator-multiload
	-ln -s ../../../data/de.mh21.indicator-multiload.gschema.xml local-xdg-data-dir/glib-2.0/schemas
	-ln -s ../../data/preferences.ui local-xdg-data-dir/indicator-multiload
	-glib-compile-schemas local-xdg-data-dir/glib-2.0/schemas
	-XDG_DATA_DIRS=./local-xdg-data-dir:$$XDG_DATA_DIRS G_MESSAGES_DEBUG=all G_SLICE=always-malloc ./indicator-multiload
	-rm -rf local-xdg-data-dir

test-debug: all
	-rm -rf local-xdg-data-dir
	-mkdir -p local-xdg-data-dir/glib-2.0/schemas local-xdg-data-dir/indicator-multiload
	-ln -s ../../../data/de.mh21.indicator-multiload.gschema.xml local-xdg-data-dir/glib-2.0/schemas
	-ln -s ../../data/preferences.ui local-xdg-data-dir/indicator-multiload
	-glib-compile-schemas local-xdg-data-dir/glib-2.0/schemas
	-XDG_DATA_DIRS=./local-xdg-data-dir:$$XDG_DATA_DIRS G_MESSAGES_DEBUG=all G_SLICE=always-malloc gdb --args ./indicator-multiload
	-rm -rf local-xdg-data-dir

test-valgrind: all
	-rm -rf local-xdg-data-dir
	-mkdir -p local-xdg-data-dir/glib-2.0/schemas local-xdg-data-dir/indicator-multiload
	-ln -s ../../../data/de.mh21.indicator-multiload.gschema.xml local-xdg-data-dir/glib-2.0/schemas
	-ln -s ../../data/preferences.ui local-xdg-data-dir/indicator-multiload
	-glib-compile-schemas local-xdg-data-dir/glib-2.0/schemas
	-XDG_DATA_DIRS=./local-xdg-data-dir:$$XDG_DATA_DIRS G_MESSAGES_DEBUG=all G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind --tool=memcheck --leak-check=full --leak-resolution=high --num-callers=20 --show-reachable=yes --log-file=vgdump ./indicator-multiload
	-rm -rf local-xdg-data-dir

# these are a bit of a hack, as automake has tags support
tags:
	-anjuta-tags -R -o tags src

tags-vala:
	-anjuta-tags -o tags-vala /usr/share/vala-$$($(VALAC) --version | sed 's/.*\(0\.[0-9]\+\)\.[0-9]\+/\1/')/vapi/*.vapi