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