1 # -*- mode: Makefile; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: t -*-
3 # Conky, a system monitor, based on torsmo
5 # Any original torsmo code is licensed under the BSD license
7 # All code written since the fork of torsmo is licensed under the GPL
9 # Please see COPYING for details
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.
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.
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/>.
28 INCLUDES = -DSYSTEM_CONFIG_FILE=\"$(sysconfdir)/conky/conky.conf\" -DPACKAGE_LIBDIR=\"$(pkglibdir)\"
34 if BUILD_CONFIG_OUTPUT
35 config_output = defconfig.h
36 config_cookie = conf_cookie.c conf_cookie.h
38 config_input = $(srcdir)/../data/conky.conf
40 config_input = $(srcdir)/../data/conky_no_x11.conf
43 conky_DEPENDENCIES = $(config_output)
44 BUILT_SOURCES = $(config_output)
45 CLEANFILES = $(config_output)
47 $(config_output): ${config_input}
48 sh $(srcdir)/../text2c.sh ${config_input} $@ defconfig
49 endif # BUILD_CONFIG_OUTPUT
51 # source files always needed for compiling
52 mandatory_sources = colours.c colours.h common.c common.h conky.c conky.h \
53 core.c core.h diskio.c diskio.h exec.c exec.h fs.c fs.h logging.h \
54 mail.c mail.h mixer.c mixer.h template.c template.h timed_thread.c \
55 timed_thread.h mboxscan.c mboxscan.h read_tcp.c read_tcp.h specials.c \
56 specials.h tailhead.c tailhead.h temphelper.c temphelper.h \
57 text_object.c text_object.h timeinfo.c timeinfo.h algebra.c algebra.h
59 # source files only needed when the apropriate option is enabled
60 audacious = audacious.c audacious.h
62 ibm = ibm.c ibm.h smapi.c smapi.h
63 mpd = mpd.c mpd.h libmpdclient.c libmpdclient.h
65 xmms2 = xmms2.c xmms2.h
66 linux = linux.c linux.h top.c top.h users.c sony.c sony.h
68 freebsd = freebsd.c freebsd.h
69 netbsd = netbsd.c netbsd.h
70 openbsd = openbsd.c openbsd.h
71 port_monitors = libtcp-portmon.c libtcp-portmon.h \
72 tcp-portmon.c tcp-portmon.h
73 x11 = x11.c x11.h fonts.c fonts.h
74 hddtemp = hddtemp.c hddtemp.h
76 ccurl_thread = ccurl_thread.c ccurl_thread.h
77 rss = rss.c rss.h prss.c prss.h
78 weather = weather.c weather.h
80 nvidia = nvidia.c nvidia.h
81 imlib2 = imlib2.c imlib2.h
82 apcupsd = apcupsd.c apcupsd.h
83 iconv = iconv_tools.c iconv_tools.h
85 # make sure the files from above are always included in the distfile
86 EXTRA_DIST = $(audacious) $(bmpx) $(ibm) $(mpd) $(moc) $(xmms2) $(linux) \
87 $(solaris) $(freebsd) $(netbsd) $(openbsd) $(port_monitors) \
88 $(x11) $(hddtemp) $(eve) $(ccurl_thread) $(rss) $(weather) \
89 $(lua) $(nvidia) $(imlib2) $(apcupsd)
91 # collect all selected optional sources
94 optional_sources += $(audacious)
97 optional_sources += $(bmpx)
100 optional_sources += $(ibm)
103 optional_sources += $(mpd)
106 optional_sources += $(moc)
109 optional_sources += $(xmms2)
112 optional_sources += $(linux)
115 #optional_sources += $(solaris)
118 optional_sources += $(freebsd)
121 #optional_sources += $(netbsd)
124 optional_sources += $(openbsd)
126 if BUILD_PORT_MONITORS
127 optional_sources += $(port_monitors)
130 optional_sources += $(x11)
133 optional_sources += $(hddtemp)
136 optional_sources += $(eve)
139 optional_sources += $(ccurl_thread)
142 optional_sources += $(rss)
145 optional_sources += $(weather)
148 optional_sources += $(lua)
151 optional_sources += $(nvidia)
154 optional_sources += $(imlib2)
157 optional_sources += $(apcupsd)
160 optional_sources += $(iconv)
163 # linux takes the standard to the max
165 PTHREAD_LIBS = -lpthread
167 PTHREAD_LIBS = -pthread
170 conky_LDFLAGS = $(PTHREAD_LIBS) -lm
172 conky_SOURCES = $(config_output) $(config_cookie) \
173 $(optional_sources) $(mandatory_sources)
175 # vi:set ts=4 sw=4 noet ai nocindent syntax=automake: