summaryrefslogtreecommitdiff
path: root/src/Makefile.am
blob: d5ff37ebd6dadcc9ac60e169731bcc10bc8f0e55 (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
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
bin_PROGRAMS = xfce4-power-manager

generated_files =						\
				xfpm-enum-types.c		\
				xfpm-enum-types.h		\
				xfpm-marshal.c			\
				xfpm-marshal.h
				

xfce4_power_manager_SOURCES = 	$(generated_files)		\
				xfpm-main.c			\
				xfpm-debug.h			\
                xfpm-hal.c          		\
				xfpm-hal.h	     		\
				xfpm-driver.c			\
				xfpm-driver.h			\
				xfpm-ac-adapter.c		\
				xfpm-ac-adapter.h		\
				xfpm-cpu.c			\
				xfpm-cpu.h			\
				xfpm-lcd-brightness.c		\
				xfpm-lcd-brightness.h		\
				xfpm-button.c			\
				xfpm-button.h			\
				xfpm-dbus-messages.c		\
				xfpm-dbus-messages.h		\
				xfpm-battery.c			\
				xfpm-battery.h			\
				xfpm-battery-icon.c		\
				xfpm-battery-icon.h		\
				xfpm-spin-button.c		\
				xfpm-spin-button.h		\
				xfpm-dpms.c			\
				xfpm-dpms.h			\
				xfpm-dpms-spins.c		\
				xfpm-dpms-spins.h		\
				xfpm-popups.c           	\
				xfpm-popups.h           	\
				xfpm-notify.c			\
				xfpm-notify.h			\
				xfpm-enums.h			\
				xfpm-settings.c			\
				xfpm-settings.h			\
				xfpm-common.c			\
				xfpm-common.h

xfce4_power_manager_CFLAGS =					\
			-DLOCALEDIR=\"$(localedir)\"		\
			-DG_LOG_DOMAIN=\"xfce4-power-manager\" \
			$(GTK_CFLAGS)				\
			$(GLIB_CFLAGS)				\
			$(DBUS_CFLAGS)				\
			$(DBUS_GLIB_CFLAGS)			\
			$(HAL_CFLAGS)				\
			$(LIBXFCEGUI_CFLAGS)			\
			$(LIBXFCEUTIL_CFLAGS)			\
			$(XFCONF_CFLAGS)			\
			$(LIBNOTIFY_CFLAGS)			\
			$(DPMS_CFLAGS)              	

xfce4_power_manager_LDADD   =					\
			$(GTK_LIBS)				\
			$(GLIB_LIBS)				\
			$(DBUS_LIBS)				\
			$(DBUS_GLIB_LIBS)			\
			$(LIBXFCEGUI_LIBS)			\
			$(LIBXFCEUTIL_LIBS)			\
			$(HAL_LIBS)				\
			$(XFCONF_LIBS)				\
			$(LIBNOTIFY_LIBS)			\
			$(DPMS_LIBS)		


EXTRA_DIST = 						\
	xfpm-marshal.list				\
	$(generated_files)				\
	$(desktop_in_files)

DISTCLEANFILES =					\
	$(generated_files)				\
	$(desktop_DATA)

xfpm_headers = 						\
	$(srcdir)/xfpm-enums.h			

xfpm-enum-types.h: $(xfpm_headers)
	( cd $(srcdir) && glib-mkenums \
		--fhead "#ifndef _XFPM_ENUM_TYPES_H\n#define _XFPM_ENUM_TYPES_H\n#include <glib-object.h>\nG_BEGIN_DECLS\n" \
		--fprod "/* enumerations from \"@filename@\" */\n" \
		--vhead "GType @enum_name@_get_type (void);\n#define XFPM_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
		--ftail "G_END_DECLS\n\n#endif /* _XFPM_ENUM_TYPES_H__ */" \
		$(xfpm_headers) ) >> xgen \
	&& (cmp -s xgen xfpm-enum-types.h || cp xgen xfpm-enum-types.h ) \
	&& rm -f xgen xgen~

xfpm-enum-types.c: xfpm-enum-types.h
	( cd $(srcdir) && glib-mkenums \
		--fhead "#include <xfpm-enum-types.h>\n" \
		--fhead "#include \"xfpm-enums.h\"\n\n" \
		--fprod "\n/* enumerations from \"@filename@\" */\n" \
		--vhead "GType\n@enum_name@_get_type (void)\n{\n\tstatic GType type = 0;\n\tif (type == 0) {\n\tstatic const G@Type@Value values[] = {"\
		--vprod "\t{ @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
		--vtail "\t{ 0, NULL, NULL }\n\t};\n\ttype = g_@type@_register_static (\"@EnumName@\", values);\n  }\n\treturn type;\n}\n" \
		$(xfpm_headers) ) > xgen \
	&& cp xgen xfpm-enum-types.c  \
	&& rm -f xgen xgen~

xfpm-marshal.h: $(srcdir)/xfpm-marshal.list
	glib-genmarshal --header --prefix="_xfpm_marshal" \
            $(srcdir)/xfpm-marshal.list > tmp-marshal.h && \
        cp tmp-marshal.h $(@F) && \
        rm -f tmp-marshal.h tmp-marshal.h~
                                                                                
xfpm-marshal.c: xfpm-marshal.h
	glib-genmarshal --body --prefix="_xfpm_marshal" \
            $(srcdir)/xfpm-marshal.list > tmp-marshal.c && \
        cp tmp-marshal.c $(@F) && \
        rm -f tmp-marshal.c tmp-marshal.c~
			

			
#
# .desktop file
#
desktopdir = $(datadir)/applications
desktop_in_files =							\
	xfce4-power-manager.desktop.in
desktop_DATA =								\
	$(desktop_in_files:.desktop.in=.desktop)

@INTLTOOL_DESKTOP_RULE@