net_stats: outsource network-related objects
[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 # source files always needed for compiling
52 mandatory_sources = colours.c colours.h combine.c combine.h common.c common.h \
53                 conky.c conky.h core.c core.h diskio.c diskio.h exec.c exec.h fs.c \
54                 fs.h logging.h mail.c mail.h mixer.c mixer.h net_stat.c net_stat.h \
55                 template.c template.h timed_thread.c timed_thread.h mboxscan.c \
56                 mboxscan.h read_tcp.c read_tcp.h scroll.c scroll.h specials.c \
57                 specials.h tailhead.c tailhead.h temphelper.c temphelper.h \
58                 text_object.c text_object.h timeinfo.c timeinfo.h algebra.c algebra.h
59
60 # source files only needed when the apropriate option is enabled
61 audacious = audacious.c audacious.h
62 bmpx = bmpx.c bmpx.h
63 ibm = ibm.c ibm.h smapi.c smapi.h
64 mpd = mpd.c mpd.h libmpdclient.c libmpdclient.h
65 moc = moc.c moc.h
66 xmms2 = xmms2.c xmms2.h
67 linux = linux.c linux.h top.c top.h users.c sony.c sony.h
68 solaris = solaris.c
69 freebsd = freebsd.c freebsd.h
70 netbsd = netbsd.c netbsd.h
71 openbsd = openbsd.c openbsd.h
72 port_monitors = libtcp-portmon.c libtcp-portmon.h \
73                 tcp-portmon.c tcp-portmon.h
74 x11 = x11.c x11.h fonts.c fonts.h
75 hddtemp = hddtemp.c hddtemp.h
76 eve = eve.c eve.h
77 ccurl_thread = ccurl_thread.c ccurl_thread.h
78 rss = rss.c rss.h prss.c prss.h
79 weather = weather.c weather.h
80 lua = llua.c llua.h
81 nvidia = nvidia.c nvidia.h
82 imlib2 = imlib2.c imlib2.h
83 apcupsd = apcupsd.c apcupsd.h
84 iconv = iconv_tools.c iconv_tools.h
85
86 # make sure the files from above are always included in the distfile
87 EXTRA_DIST = $(audacious) $(bmpx) $(ibm) $(mpd) $(moc) $(xmms2) $(linux) \
88              $(solaris) $(freebsd) $(netbsd) $(openbsd) $(port_monitors) \
89              $(x11) $(hddtemp) $(eve) $(ccurl_thread) $(rss) $(weather) \
90              $(lua) $(nvidia) $(imlib2) $(apcupsd)
91
92 # collect all selected optional sources
93 optional_sources =
94 if BUILD_AUDACIOUS
95 optional_sources += $(audacious)
96 endif
97 if BUILD_BMPX
98 optional_sources += $(bmpx)
99 endif
100 if BUILD_IBM
101 optional_sources += $(ibm)
102 endif
103 if BUILD_MPD
104 optional_sources += $(mpd)
105 endif
106 if BUILD_MOC
107 optional_sources += $(moc)
108 endif
109 if BUILD_XMMS2
110 optional_sources += $(xmms2)
111 endif
112 if BUILD_LINUX
113 optional_sources += $(linux)
114 endif
115 #if BUILD_SOLARIS
116 #optional_sources += $(solaris)
117 #endif
118 if BUILD_FREEBSD
119 optional_sources += $(freebsd)
120 endif
121 #if BUILD_NETBSD
122 #optional_sources += $(netbsd)
123 #endif
124 if BUILD_OPENBSD
125 optional_sources += $(openbsd)
126 endif
127 if BUILD_PORT_MONITORS
128 optional_sources += $(port_monitors)
129 endif
130 if BUILD_X11
131 optional_sources += $(x11)
132 endif
133 if BUILD_HDDTEMP
134 optional_sources += $(hddtemp)
135 endif
136 if BUILD_EVE
137 optional_sources += $(eve)
138 endif
139 if BUILD_CURL
140 optional_sources += $(ccurl_thread)
141 endif
142 if BUILD_RSS
143 optional_sources += $(rss)
144 endif
145 if BUILD_WEATHER
146 optional_sources += $(weather)
147 endif
148 if BUILD_LUA
149 optional_sources += $(lua)
150 endif
151 if BUILD_NVIDIA
152 optional_sources += $(nvidia)
153 endif
154 if BUILD_IMLIB2
155 optional_sources += $(imlib2)
156 endif
157 if BUILD_APCUPSD
158 optional_sources += $(apcupsd)
159 endif
160 if BUILD_ICONV
161 optional_sources += $(iconv)
162 endif
163
164 # linux takes the standard to the max
165 if BUILD_LINUX
166 PTHREAD_LIBS = -lpthread
167 else
168 PTHREAD_LIBS = -pthread
169 endif
170
171 conky_LDFLAGS = $(PTHREAD_LIBS) -lm
172
173 conky_SOURCES = $(config_output) $(config_cookie) \
174                 $(optional_sources) $(mandatory_sources)
175
176 # vi:set ts=4 sw=4 noet ai nocindent syntax=automake: