minor fix to allow out-of-tree builds
[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         $(freebsd)              \
154         fs.c                    \
155         $(hddtemp)              \
156         $(apcupsd)              \
157         $(linux)                \
158         logging.h               \
159         $(nvidia)               \
160         mail.c                  \
161         mixer.c                 \
162         $(mpd)                  \
163         $(moc)                  \
164         $(netbsd)               \
165         $(openbsd)              \
166         $(port_monitors)        \
167         $(eve)                  \
168         $(rss)                  \
169         $(weather)              \
170         $(lua)                  \
171         $(solaris)              \
172         timed_thread.c          \
173         timed_thread.h          \
174         mboxscan.c              \
175         mboxscan.h              \
176         $(x11)                  \
177         $(xmms2)                \
178         $(ibm)                  \
179         specials.c              \
180         specials.h              \
181         tailhead.c              \
182         tailhead.h              \
183         temphelper.c            \
184         temphelper.h            \
185         text_object.h           \
186         text_object.c           \
187         algebra.h               \
188         algebra.c               \
189         $(imlib2)               \
190         $(ccurl_thread)
191
192 conky_LDFLAGS = \
193         $(PTHREAD_LIBS) \
194         -lm
195
196 EXTRA_DIST = \
197         $(config_output)        \
198         $(config_cookie)        \
199         audacious.c             \
200         audacious.h             \
201         bmpx.c                  \
202         colours.c               \
203         colours.h               \
204         common.h                \
205         fonts.c                 \
206         fonts.h                 \
207         freebsd.c               \
208         freebsd.h               \
209         fs.h                    \
210         hddtemp.c               \
211         hddtemp.h               \
212         apcupsd.c               \
213         apcupsd.h               \
214         linux.c                 \
215         linux.h                 \
216         libmpdclient.c          \
217         libmpdclient.h          \
218         libtcp-portmon.c        \
219         libtcp-portmon.h        \
220         rss.h                   \
221         prss.h                  \
222         weather.h               \
223         llua.h                  \
224         mail.h                  \
225         mixer.h                 \
226         moc.h                   \
227         moc.c                   \
228         mpd.c                   \
229         mpd.h                   \
230         netbsd.c                \
231         nvidia.c                \
232         nvidia.h                \
233         openbsd.c               \
234         openbsd.h               \
235         solaris.c               \
236         specials.c              \
237         specials.h              \
238         tailhead.c              \
239         tailhead.h              \
240         top.h                   \
241         diskio.h                \
242         x11.c                   \
243         x11.h                   \
244         xmms2.c                 \
245         xmms2.h                 \
246         smapi.c                 \
247         smapi.h                 \
248         ibm.c                   \
249         ibm.h                   \
250         sony.h                  \
251         users.c                 \
252         imlib2.c                \
253         imlib2.h                \
254         ccurl_thread.h
255
256
257 # vi:set ts=4 sw=4 noet ai nocindent syntax=automake: