2009-07-28 21:44:22 +00:00
|
|
|
# -*- mode: Makefile; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: t -*-
|
|
|
|
#
|
2007-10-23 21:52:11 +00:00
|
|
|
# Conky, a system monitor, based on torsmo
|
|
|
|
#
|
|
|
|
# Any original torsmo code is licensed under the BSD license
|
|
|
|
#
|
|
|
|
# All code written since the fork of torsmo is licensed under the GPL
|
|
|
|
#
|
|
|
|
# Please see COPYING for details
|
|
|
|
#
|
|
|
|
# Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
|
2009-03-30 04:55:30 +00:00
|
|
|
# Copyright (c) 2005-2009 Brenden Matthews, Philip Kovacs, et. al. (see AUTHORS)
|
2007-10-23 21:52:11 +00:00
|
|
|
# All rights reserved.
|
|
|
|
#
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
#
|
|
|
|
|
2009-07-08 08:09:06 +00:00
|
|
|
INCLUDES = -DSYSTEM_CONFIG_FILE=\"$(sysconfdir)/conky/conky.conf\" -DPACKAGE_LIBDIR=\"$(pkglibdir)\"
|
2007-10-23 21:52:11 +00:00
|
|
|
|
2005-08-21 23:09:36 +00:00
|
|
|
bin_PROGRAMS = conky
|
|
|
|
|
2009-07-08 08:09:06 +00:00
|
|
|
LIBS = ${conky_LIBS}
|
|
|
|
|
2008-12-12 14:33:25 +00:00
|
|
|
if BUILD_CONFIG_OUTPUT
|
|
|
|
config_output = defconfig.h
|
2008-12-14 13:36:44 +00:00
|
|
|
config_cookie = conf_cookie.c conf_cookie.h
|
2009-06-21 21:46:03 +00:00
|
|
|
if BUILD_X11
|
2009-07-31 11:50:33 +00:00
|
|
|
config_input = $(srcdir)/../data/conky.conf
|
2009-06-21 21:46:03 +00:00
|
|
|
else
|
2009-07-31 11:50:33 +00:00
|
|
|
config_input = $(srcdir)/../data/conky_no_x11.conf
|
2008-12-14 13:36:44 +00:00
|
|
|
endif
|
2009-06-21 21:46:03 +00:00
|
|
|
|
2008-12-12 14:33:25 +00:00
|
|
|
conky_DEPENDENCIES = $(config_output)
|
|
|
|
BUILT_SOURCES = $(config_output)
|
2009-11-14 02:09:07 +00:00
|
|
|
CLEANFILES = $(config_output) *.gcda *.gcno
|
2009-06-21 21:46:03 +00:00
|
|
|
|
|
|
|
$(config_output): ${config_input}
|
2009-07-19 22:43:41 +00:00
|
|
|
sh $(srcdir)/../text2c.sh ${config_input} $@ defconfig
|
2009-06-21 21:46:03 +00:00
|
|
|
endif # BUILD_CONFIG_OUTPUT
|
2008-12-12 14:33:25 +00:00
|
|
|
|
2009-09-05 01:30:12 +00:00
|
|
|
# source files always needed for compiling
|
2009-10-17 14:14:25 +00:00
|
|
|
mandatory_sources = colours.c colours.h combine.c combine.h common.c common.h \
|
2009-11-12 22:50:17 +00:00
|
|
|
conky.c conky.h core.c core.h diskio.c diskio.h entropy.c entropy.h \
|
|
|
|
exec.c exec.h fs.c fs.h logging.h mail.c mail.h mixer.c mixer.h net_stat.c \
|
|
|
|
net_stat.h template.c template.h timed_thread.c timed_thread.h mboxscan.c \
|
2009-10-17 14:43:12 +00:00
|
|
|
mboxscan.h read_tcp.c read_tcp.h scroll.c scroll.h specials.c \
|
|
|
|
specials.h tailhead.c tailhead.h temphelper.c temphelper.h \
|
2009-11-11 09:55:25 +00:00
|
|
|
text_object.c text_object.h timeinfo.c timeinfo.h algebra.c \
|
2009-11-15 16:21:55 +00:00
|
|
|
algebra.h proc.c proc.h user.c user.h
|
2009-09-05 01:30:12 +00:00
|
|
|
|
|
|
|
# source files only needed when the apropriate option is enabled
|
2006-11-03 20:54:52 +00:00
|
|
|
audacious = audacious.c audacious.h
|
2009-09-05 01:30:12 +00:00
|
|
|
bmpx = bmpx.c bmpx.h
|
|
|
|
ibm = ibm.c ibm.h smapi.c smapi.h
|
|
|
|
mpd = mpd.c mpd.h libmpdclient.c libmpdclient.h
|
|
|
|
moc = moc.c moc.h
|
|
|
|
xmms2 = xmms2.c xmms2.h
|
2009-11-25 23:51:19 +00:00
|
|
|
linux = linux.c linux.h top.c top.h users.c users.h sony.c sony.h i8k.c i8k.h
|
2009-09-05 01:30:12 +00:00
|
|
|
solaris = solaris.c
|
|
|
|
freebsd = freebsd.c freebsd.h
|
|
|
|
netbsd = netbsd.c netbsd.h
|
|
|
|
openbsd = openbsd.c openbsd.h
|
|
|
|
port_monitors = libtcp-portmon.c libtcp-portmon.h \
|
|
|
|
tcp-portmon.c tcp-portmon.h
|
|
|
|
x11 = x11.c x11.h fonts.c fonts.h
|
|
|
|
hddtemp = hddtemp.c hddtemp.h
|
|
|
|
eve = eve.c eve.h
|
|
|
|
ccurl_thread = ccurl_thread.c ccurl_thread.h
|
|
|
|
rss = rss.c rss.h prss.c prss.h
|
|
|
|
weather = weather.c weather.h
|
|
|
|
lua = llua.c llua.h
|
|
|
|
nvidia = nvidia.c nvidia.h
|
|
|
|
imlib2 = imlib2.c imlib2.h
|
|
|
|
apcupsd = apcupsd.c apcupsd.h
|
2009-10-03 18:01:33 +00:00
|
|
|
iconv = iconv_tools.c iconv_tools.h
|
2009-09-05 01:30:12 +00:00
|
|
|
|
|
|
|
# make sure the files from above are always included in the distfile
|
|
|
|
EXTRA_DIST = $(audacious) $(bmpx) $(ibm) $(mpd) $(moc) $(xmms2) $(linux) \
|
|
|
|
$(solaris) $(freebsd) $(netbsd) $(openbsd) $(port_monitors) \
|
|
|
|
$(x11) $(hddtemp) $(eve) $(ccurl_thread) $(rss) $(weather) \
|
|
|
|
$(lua) $(nvidia) $(imlib2) $(apcupsd)
|
2005-12-30 09:44:40 +00:00
|
|
|
|
2009-09-05 01:30:12 +00:00
|
|
|
# collect all selected optional sources
|
|
|
|
optional_sources =
|
|
|
|
if BUILD_AUDACIOUS
|
|
|
|
optional_sources += $(audacious)
|
|
|
|
endif
|
2006-01-08 08:02:37 +00:00
|
|
|
if BUILD_BMPX
|
2009-09-05 01:30:12 +00:00
|
|
|
optional_sources += $(bmpx)
|
2006-01-05 07:06:42 +00:00
|
|
|
endif
|
2009-01-03 23:00:52 +00:00
|
|
|
if BUILD_IBM
|
2009-09-05 01:30:12 +00:00
|
|
|
optional_sources += $(ibm)
|
2009-01-03 23:00:52 +00:00
|
|
|
endif
|
2005-08-21 23:09:36 +00:00
|
|
|
if BUILD_MPD
|
2009-09-05 01:30:12 +00:00
|
|
|
optional_sources += $(mpd)
|
2005-08-21 23:09:36 +00:00
|
|
|
endif
|
2008-09-24 06:59:45 +00:00
|
|
|
if BUILD_MOC
|
2009-09-05 01:30:12 +00:00
|
|
|
optional_sources += $(moc)
|
2008-09-24 06:59:45 +00:00
|
|
|
endif
|
2006-03-25 21:21:07 +00:00
|
|
|
if BUILD_XMMS2
|
2009-09-05 01:30:12 +00:00
|
|
|
optional_sources += $(xmms2)
|
2006-03-25 21:21:07 +00:00
|
|
|
endif
|
2005-08-21 23:09:36 +00:00
|
|
|
if BUILD_LINUX
|
2009-09-05 01:30:12 +00:00
|
|
|
optional_sources += $(linux)
|
2005-08-21 23:09:36 +00:00
|
|
|
endif
|
2006-08-12 06:10:18 +00:00
|
|
|
#if BUILD_SOLARIS
|
2009-09-05 01:30:12 +00:00
|
|
|
#optional_sources += $(solaris)
|
2006-08-12 06:10:18 +00:00
|
|
|
#endif
|
2005-08-21 23:09:36 +00:00
|
|
|
if BUILD_FREEBSD
|
2009-09-05 01:30:12 +00:00
|
|
|
optional_sources += $(freebsd)
|
2005-08-21 23:09:36 +00:00
|
|
|
endif
|
2006-08-12 06:10:18 +00:00
|
|
|
#if BUILD_NETBSD
|
2009-09-05 01:30:12 +00:00
|
|
|
#optional_sources += $(netbsd)
|
2006-08-12 06:10:18 +00:00
|
|
|
#endif
|
2007-03-01 01:43:43 +00:00
|
|
|
if BUILD_OPENBSD
|
2009-09-05 01:30:12 +00:00
|
|
|
optional_sources += $(openbsd)
|
2007-03-01 01:43:43 +00:00
|
|
|
endif
|
2005-10-31 05:17:06 +00:00
|
|
|
if BUILD_PORT_MONITORS
|
2009-09-05 01:30:12 +00:00
|
|
|
optional_sources += $(port_monitors)
|
2005-10-31 05:17:06 +00:00
|
|
|
endif
|
2005-08-21 23:09:36 +00:00
|
|
|
if BUILD_X11
|
2009-09-05 01:30:12 +00:00
|
|
|
optional_sources += $(x11)
|
2005-08-21 23:09:36 +00:00
|
|
|
endif
|
2006-08-10 16:56:13 +00:00
|
|
|
if BUILD_HDDTEMP
|
2009-09-05 01:30:12 +00:00
|
|
|
optional_sources += $(hddtemp)
|
2006-08-10 16:56:13 +00:00
|
|
|
endif
|
2008-06-28 20:14:04 +00:00
|
|
|
if BUILD_EVE
|
2009-09-05 01:30:12 +00:00
|
|
|
optional_sources += $(eve)
|
2008-06-28 20:14:04 +00:00
|
|
|
endif
|
2009-07-20 05:43:36 +00:00
|
|
|
if BUILD_CURL
|
2009-09-05 01:30:12 +00:00
|
|
|
optional_sources += $(ccurl_thread)
|
2009-07-20 05:43:36 +00:00
|
|
|
endif
|
2007-05-06 12:17:13 +00:00
|
|
|
if BUILD_RSS
|
2009-09-05 01:30:12 +00:00
|
|
|
optional_sources += $(rss)
|
2007-05-06 12:17:13 +00:00
|
|
|
endif
|
2009-07-06 22:20:12 +00:00
|
|
|
if BUILD_WEATHER
|
2009-09-05 01:30:12 +00:00
|
|
|
optional_sources += $(weather)
|
2009-07-06 22:20:12 +00:00
|
|
|
endif
|
2009-05-15 18:08:51 +00:00
|
|
|
if BUILD_LUA
|
2009-09-05 01:30:12 +00:00
|
|
|
optional_sources += $(lua)
|
2009-05-15 18:08:51 +00:00
|
|
|
endif
|
2008-06-03 20:46:15 +00:00
|
|
|
if BUILD_NVIDIA
|
2009-09-05 01:30:12 +00:00
|
|
|
optional_sources += $(nvidia)
|
2008-06-03 20:46:15 +00:00
|
|
|
endif
|
2009-05-06 03:45:05 +00:00
|
|
|
if BUILD_IMLIB2
|
2009-09-05 01:30:12 +00:00
|
|
|
optional_sources += $(imlib2)
|
2009-05-06 03:45:05 +00:00
|
|
|
endif
|
2009-05-10 18:58:06 +00:00
|
|
|
if BUILD_APCUPSD
|
2009-09-05 01:30:12 +00:00
|
|
|
optional_sources += $(apcupsd)
|
2009-05-10 18:58:06 +00:00
|
|
|
endif
|
2009-10-03 18:01:33 +00:00
|
|
|
if BUILD_ICONV
|
|
|
|
optional_sources += $(iconv)
|
|
|
|
endif
|
2009-05-10 18:58:06 +00:00
|
|
|
|
2009-09-05 01:30:12 +00:00
|
|
|
# linux takes the standard to the max
|
|
|
|
if BUILD_LINUX
|
|
|
|
PTHREAD_LIBS = -lpthread
|
|
|
|
else
|
|
|
|
PTHREAD_LIBS = -pthread
|
|
|
|
endif
|
2005-08-21 23:09:36 +00:00
|
|
|
|
2009-09-05 01:30:12 +00:00
|
|
|
conky_LDFLAGS = $(PTHREAD_LIBS) -lm
|
2008-06-15 18:38:33 +00:00
|
|
|
|
2009-09-05 01:30:12 +00:00
|
|
|
conky_SOURCES = $(config_output) $(config_cookie) \
|
|
|
|
$(optional_sources) $(mandatory_sources)
|
2007-01-08 01:10:12 +00:00
|
|
|
|
2009-07-27 20:47:19 +00:00
|
|
|
# vi:set ts=4 sw=4 noet ai nocindent syntax=automake:
|