outsource the whole template object machinery
[monky] / src / Makefile.am
1 # -*- mode: Makefile; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: t -*-
2 #
3 # Conky, a system monitor, based on torsmo
4 #
5 # Any original torsmo code is licensed under the BSD license
6 #
7 # All code written since the fork of torsmo is licensed under the GPL
8 #
9 # Please see COPYING for details
10 #
11 # Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
12 # Copyright (c) 2005-2009 Brenden Matthews, Philip Kovacs, et. al. (see AUTHORS)
13 # All rights reserved.
14 #
15 # This program is free software: you can redistribute it and/or modify
16 # it under the terms of the GNU General Public License as published by
17 # the Free Software Foundation, either version 3 of the License, or
18 # (at your option) any later version.
19 #
20 # This program is distributed in the hope that it will be useful,
21 # but WITHOUT ANY WARRANTY; without even the implied warranty of
22 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23 # GNU General Public License for more details.
24 # You should have received a copy of the GNU General Public License
25 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
26 #
27
28 INCLUDES = -DSYSTEM_CONFIG_FILE=\"$(sysconfdir)/conky/conky.conf\" -DPACKAGE_LIBDIR=\"$(pkglibdir)\"
29
30 bin_PROGRAMS = conky
31
32 LIBS = ${conky_LIBS}
33
34 if BUILD_CONFIG_OUTPUT
35 config_output = defconfig.h
36 config_cookie = conf_cookie.c conf_cookie.h
37 if BUILD_X11
38 config_input = $(srcdir)/../data/conky.conf
39 else
40 config_input = $(srcdir)/../data/conky_no_x11.conf
41 endif
42
43 conky_DEPENDENCIES = $(config_output)
44 BUILT_SOURCES = $(config_output)
45 CLEANFILES = $(config_output)
46
47 $(config_output): ${config_input}
48         sh $(srcdir)/../text2c.sh ${config_input} $@ defconfig
49 endif # BUILD_CONFIG_OUTPUT
50
51 if BUILD_AUDACIOUS
52 audacious = audacious.c audacious.h
53 endif
54
55 if BUILD_BMPX
56 bmpx = bmpx.c
57 endif
58
59 if BUILD_IBM
60 ibm = ibm.c ibm.h smapi.c smapi.h
61 endif
62
63 if BUILD_MPD
64 mpd = mpd.c libmpdclient.c
65 endif
66
67 if BUILD_MOC
68 moc = moc.c
69 endif
70
71 if BUILD_XMMS2
72 xmms2 = xmms2.c
73 endif
74
75 if BUILD_LINUX
76 linux = linux.c top.c diskio.c users.c sony.c
77 PTHREAD_LIBS =  -lpthread
78 endif
79
80 #if BUILD_SOLARIS
81 #solaris = solaris.c
82 #endif
83
84 if BUILD_FREEBSD
85 freebsd = freebsd.c diskio.c
86 PTHREAD_LIBS =  -pthread
87 endif
88
89 #if BUILD_NETBSD
90 #netbsd = netbsd.c
91 #endif
92
93 if BUILD_OPENBSD
94 openbsd = openbsd.c
95 PTHREAD_LIBS =  -pthread
96 endif
97
98 if BUILD_PORT_MONITORS
99 port_monitors = libtcp-portmon.h libtcp-portmon.c \
100                 tcp-portmon.h tcp-portmon.c
101 endif
102
103 if BUILD_X11
104 x11 = x11.c fonts.c
105 endif
106
107 if BUILD_HDDTEMP
108 hddtemp = hddtemp.c
109 endif
110
111 if BUILD_EVE
112 eve = eve.c eve.h
113 endif
114
115 if BUILD_CURL
116 ccurl_thread = ccurl_thread.c ccurl_thread.h
117 endif
118
119 if BUILD_RSS
120 rss = rss.c prss.c prss.h
121 endif
122
123 if BUILD_WEATHER
124 weather = weather.c weather.h
125 endif
126
127 if BUILD_LUA
128 lua = llua.c llua.h
129 endif
130
131 if BUILD_NVIDIA
132 nvidia = nvidia.c nvidia.h
133 endif
134
135 if BUILD_IMLIB2
136 imlib2 = imlib2.c imlib2.h
137 endif
138
139 if BUILD_APCUPSD
140 apcupsd = apcupsd.c apcupsd.h
141 endif
142
143 conky_SOURCES = \
144         $(config_output)        \
145         $(config_cookie)        \
146         $(audacious)            \
147         $(bmpx)                 \
148         colours.c               \
149         colours.h               \
150         common.c                \
151         conky.c                 \
152         conky.h                 \
153         core.c                  \
154         core.h                  \
155         $(freebsd)              \
156         fs.c                    \
157         $(hddtemp)              \
158         $(apcupsd)              \
159         $(linux)                \
160         logging.h               \
161         $(nvidia)               \
162         mail.c                  \
163         mixer.c                 \
164         $(mpd)                  \
165         $(moc)                  \
166         $(netbsd)               \
167         $(openbsd)              \
168         $(port_monitors)        \
169         $(eve)                  \
170         $(rss)                  \
171         $(weather)              \
172         $(lua)                  \
173         $(solaris)              \
174         template.c              \
175         template.h              \
176         timed_thread.c          \
177         timed_thread.h          \
178         mboxscan.c              \
179         mboxscan.h              \
180         $(x11)                  \
181         $(xmms2)                \
182         $(ibm)                  \
183         specials.c              \
184         specials.h              \
185         tailhead.c              \
186         tailhead.h              \
187         temphelper.c            \
188         temphelper.h            \
189         text_object.h           \
190         text_object.c           \
191         algebra.h               \
192         algebra.c               \
193         $(imlib2)               \
194         $(ccurl_thread)
195
196 conky_LDFLAGS = \
197         $(PTHREAD_LIBS) \
198         -lm
199
200 EXTRA_DIST = \
201         $(config_output)        \
202         $(config_cookie)        \
203         audacious.c             \
204         audacious.h             \
205         bmpx.c                  \
206         colours.c               \
207         colours.h               \
208         common.h                \
209         fonts.c                 \
210         fonts.h                 \
211         freebsd.c               \
212         freebsd.h               \
213         fs.h                    \
214         hddtemp.c               \
215         hddtemp.h               \
216         apcupsd.c               \
217         apcupsd.h               \
218         linux.c                 \
219         linux.h                 \
220         libmpdclient.c          \
221         libmpdclient.h          \
222         libtcp-portmon.c        \
223         libtcp-portmon.h        \
224         rss.h                   \
225         prss.h                  \
226         weather.h               \
227         llua.h                  \
228         mail.h                  \
229         mixer.h                 \
230         moc.h                   \
231         moc.c                   \
232         mpd.c                   \
233         mpd.h                   \
234         netbsd.c                \
235         nvidia.c                \
236         nvidia.h                \
237         openbsd.c               \
238         openbsd.h               \
239         solaris.c               \
240         specials.c              \
241         specials.h              \
242         tailhead.c              \
243         tailhead.h              \
244         template.c              \
245         template.h              \
246         top.h                   \
247         diskio.h                \
248         x11.c                   \
249         x11.h                   \
250         xmms2.c                 \
251         xmms2.h                 \
252         smapi.c                 \
253         smapi.h                 \
254         ibm.c                   \
255         ibm.h                   \
256         sony.h                  \
257         users.c                 \
258         imlib2.c                \
259         imlib2.h                \
260         ccurl_thread.h
261
262
263 # vi:set ts=4 sw=4 noet ai nocindent syntax=automake: