1 ## Process this file with automake to produce Makefile.in
3 #AUTOMAKE_OPTIONS = foreign
4 #
5 #ACLOCAL_M4 = $(top_srcdir)/config/aclocal.m4
6 #AUTOHEADER = @AUTOHEADER@ --localdir=$(top_srcdir)/config
8 if STATIC_PROGRAMS
9 AM_LDFLAGS = -all-static
10 endif
12 INCLUDES = -DLOCALEDIR="\"$(datadir)/locale\""
13 RRD_DEFAULT_FONT=@RRD_DEFAULT_FONT@
14 AM_CPPFLAGS = -DRRD_DEFAULT_FONT=\"$(RRD_DEFAULT_FONT)\" -DNUMVERS=@NUMVERS@
15 AM_CFLAGS = @CFLAGS@
16 ## no including this by default @WERROR@
18 UPD_C_FILES = \
19 rrd_parsetime.c \
20 rrd_hw.c \
21 rrd_hw_math.c \
22 rrd_hw_update.c \
23 rrd_diff.c \
24 rrd_format.c \
25 rrd_info.c \
26 rrd_error.c \
27 rrd_open.c \
28 rrd_client.c \
29 rrd_nan_inf.c \
30 rrd_rpncalc.c \
31 rrd_utils.c \
32 rrd_update.c
34 RRD_C_FILES = \
35 rrd_create.c \
36 hash_32.c \
37 rrd_version.c \
38 rrd_last.c \
39 rrd_lastupdate.c \
40 rrd_first.c \
41 rrd_restore.c \
42 rrd_dump.c \
43 rrd_flushcached.c \
44 rrd_fetch.c \
45 rrd_resize.c \
46 rrd_tune.c
48 if BUILD_RRDGRAPH
49 RRD_C_FILES += rrd_graph.c \
50 rrd_graph_helper.c \
51 rrd_xport.c \
52 rrd_gfx.c \
53 pngsize.c
54 endif
56 noinst_HEADERS = \
57 unused.h \
58 gettext.h \
59 rrd_getopt.h rrd_parsetime.h \
60 rrd_config_bottom.h rrd_i18n.h \
61 rrd_format.h rrd_tool.h rrd_xport.h rrd.h rrd_rpncalc.h \
62 rrd_hw.h rrd_hw_math.h rrd_hw_update.h \
63 fnv.h rrd_graph.h \
64 rrd_is_thread_safe.h
66 if BUILD_LIBDBI
67 RRD_C_FILES += rrd_fetch_libdbi.c
68 endif
70 if BUILD_GETOPT
71 noinst_HEADERS += rrd_getopt.h
72 UPD_C_FILES += rrd_getopt.c rrd_getopt1.c
73 endif
75 noinst_LTLIBRARIES = librrdupd.la
77 lib_LTLIBRARIES = librrd.la
78 if BUILD_MULTITHREAD
79 lib_LTLIBRARIES += librrd_th.la
80 endif
82 librrdupd_la_SOURCES = $(UPD_C_FILES) rrd_not_thread_safe.c
83 librrdupd_la_LIBADD = $(CORE_LIBS)
85 librrd_la_SOURCES = $(RRD_C_FILES)
86 librrd_la_DEPENDENCIES = librrdupd.la librrd.sym
87 librrd_la_LIBADD = librrdupd.la $(ALL_LIBS) $(LIBINTL)
88 librrd_la_LDFLAGS = -version-info @LIBVERS@
89 librrd_la_LDFLAGS += -export-symbols librrd.sym
91 librrd_th_la_SOURCES = $(UPD_C_FILES) $(RRD_C_FILES) rrd_thread_safe.c
92 librrd_th_la_DEPENDENCIES = librrd.sym
93 librrd_th_la_CFLAGS = $(AM_CFLAGS) $(MULTITHREAD_CFLAGS)
94 librrd_th_la_LDFLAGS = $(MULTITHREAD_LDFLAGS) -version-info @LIBVERS@
95 librrd_th_la_LDFLAGS += -export-symbols librrd.sym
96 librrd_th_la_LIBADD = $(ALL_LIBS) $(LIBINTL)
98 include_HEADERS = rrd.h rrd_format.h rrd_client.h
100 bin_PROGRAMS = rrdtool rrdupdate rrdcached
102 if BUILD_RRDCGI
103 bin_PROGRAMS += rrdcgi
104 endif
106 rrdcgi_SOURCES = rrd_cgi.c
107 rrdcgi_LDADD = librrd.la
109 rrdupdate_SOURCES = rrdupdate.c
110 rrdupdate_LDADD = librrdupd.la
112 rrdtool_SOURCES = rrd_tool.c
113 rrdtool_DEPENDENCIES = librrd.la
114 rrdtool_LDADD = librrd.la
116 rrdcached_SOURCES = rrd_daemon.c
117 rrdcached_DEPENDENCIES = librrd_th.la
118 rrdcached_CPPFLAGS = -DVERSION='"$(VERSION)"' -DLOCALSTATEDIR='"$(localstatedir)"'
119 rrdcached_LDADD = librrd_th.la
121 pkgconfigdir = $(libdir)/pkgconfig
122 pkgconfig_DATA = librrd.pc
124 # strftime is here because we do not usually need it. unices have propper
125 # iso date support
126 EXTRA_DIST= librrd.pc.in strftime.c strftime.h rrd_getopt.c rrd_getopt1.c rrd_getopt.h \
127 win32comp.c rrd_thread_safe_nt.c get_ver.awk librrd.sym.in.in plbasename.c plbasename.h
130 librrd.sym: librrd.sym.in
131 $(AM_V_GEN)grep -v LIBC_HAS_GETOPT_LONG librrd.sym.in >$@