X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2FMakefile.am;h=80442ac94e57d8e293b82a9d41072751e3deac40;hb=6b0a4bd6a6cd02ab3fd52e7ef3722ee95d547a41;hp=47ecf1397f79a9673d8dd8c56c3961de67750bcf;hpb=a1fe8fd19bb4f558150e52c0624869667b739877;p=rrdtool.git diff --git a/src/Makefile.am b/src/Makefile.am index 47ecf13..80442ac 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -5,86 +5,129 @@ #ACLOCAL_M4 = $(top_srcdir)/config/aclocal.m4 #AUTOHEADER = @AUTOHEADER@ --localdir=$(top_srcdir)/config -CGI_LIB_DIR = $(top_srcdir)/@CGI_LIB_DIR@ -FREETYPE_LIB_DIR = $(top_srcdir)/@FREETYPE_LIB_DIR@ -ART_LIB_DIR = $(top_srcdir)/@ART_LIB_DIR@ -PNG_LIB_DIR = $(top_srcdir)/@PNG_LIB_DIR@ -ZLIB_LIB_DIR = $(top_srcdir)/@ZLIB_LIB_DIR@ +if STATIC_PROGRAMS +AM_LDFLAGS = -all-static +endif -INCLUDES = -I$(CGI_LIB_DIR) -I$(ART_LIB_DIR) \ - -I$(PNG_LIB_DIR) -I$(ZLIB_LIB_DIR) -I$(FREETYPE_LIB_DIR)/include +RRD_DEFAULT_FONT=@RRD_DEFAULT_FONT@ +AM_CPPFLAGS = -DRRD_DEFAULT_FONT=\"$(RRD_DEFAULT_FONT)\" -DNUMVERS=@NUMVERS@ -RRD_C_FILES = \ - getopt.c \ - getopt1.c \ - gifsize.c \ +UPD_C_FILES = \ + rrd_getopt.c \ + rrd_getopt1.c \ parsetime.c \ - hash_32.c \ rrd_hw.c \ - pngsize.c \ - rrd_create.c \ + rrd_hw_math.c \ + rrd_hw_update.c \ rrd_diff.c \ - rrd_dump.c \ + rrd_format.c \ rrd_info.c \ rrd_error.c \ - rrd_fetch.c \ - rrd_format.c \ + rrd_open.c \ + rrd_nan_inf.c \ + rrd_rpncalc.c \ + rrd_update.c + +RRD_C_FILES = \ + hash_32.c \ + pngsize.c \ + rrd_create.c \ rrd_graph.c \ rrd_graph_helper.c \ + rrd_version.c \ rrd_last.c \ - rrd_open.c \ - rrd_resize.c \ + rrd_lastupdate.c \ + rrd_first.c \ rrd_restore.c \ - rrd_rpncalc.c \ - rrd_tune.c \ - rrd_update.c \ - rrd_gfx.c rrd_gfx.h \ - getopt.h ntconfig.h parsetime.h rrd_format.h rrd_tool.h rrd.h rrd_hw.h rrd_rpncalc.h - -# Build two libraries. One is a public one that gets installed in -# $prefix/lib. Libtool does not create an archive of the PIC compiled -# objects for this library type. The second library is a private one -# meant to build the RRDs.so for perl-shared. In this case libtool -# creates a ./.lib/*.al file that contains the PIC compiled object -# files. - -RRD_LIBS = \ - $(CGI_LIB_DIR)/librrd_cgi.la \ - $(FREETYPE_LIB_DIR)/librrd_freetype.la \ - $(ART_LIB_DIR)/librrd_art.la \ - $(PNG_LIB_DIR)/librrd_png.la \ - $(ZLIB_LIB_DIR)/librrd_z.la - -lib_LTLIBRARIES = librrd.la -noinst_LTLIBRARIES = librrd_private.la + rrd_xport.c \ + rrd_gfx.c \ + rrd_dump.c \ + rrd_fetch.c \ + rrd_tool.c \ + rrd_resize.c \ + rrd_tune.c + +noinst_HEADERS = \ + unused.h \ + rrd_getopt.h parsetime.h \ + rrd_format.h rrd_tool.h rrd_xport.h rrd.h rrd_rpncalc.h \ + rrd_hw.h rrd_hw_math.h rrd_hw_update.h \ + rrd_nan_inf.h fnv.h rrd_graph.h \ + rrd_is_thread_safe.h + +noinst_LTLIBRARIES = librrdupd.la + +lib_LTLIBRARIES = librrd.la +if BUILD_MULTITHREAD +lib_LTLIBRARIES += librrd_th.la +endif + +librrdupd_la_SOURCES = $(UPD_C_FILES) rrd_not_thread_safe.c +librrdupd_la_LIBADD = $(CORE_LIBS) librrd_la_SOURCES = $(RRD_C_FILES) -librrd_private_la_SOURCES = $(RRD_C_FILES) +librrd_la_LIBADD = librrdupd.la $(ALL_LIBS) + +# This flag accepts an argument of the form current[:revision[:age]]. So, +# passing -version-info 3:12:1 sets current to 3, revision to 12, and age to 1. +# +# If either revision or age are omitted, they default to 0. Also note that +# age must be less than or equal to the current interface number. +# +# Here are a set of rules to help you update your library version information: +# +# 1. Start with version information of 0:0:0 for each libtool library. +# +# 2. Update the version information only immediately before a public +# release of your software. More frequent updates are unnecessary, and +# only guarantee that the current interface number gets larger faster. +# +# 3. If the library source code has changed at all since the last update, +# then increment revision (c:r:a becomes c:r+1:a). +# +# 4. If any interfaces have been added, removed, or changed since the last +# update, increment current, and set revision to 0. +# +# 5. If any interfaces have been added since the last public release, then +# increment age. +# +# 6. If any interfaces have been removed since the last public release, +# then set age to 0. +# +# Never try to set the interface numbers so that they correspond to the +# release number of your package. This is an abuse that only fosters +# misunderstanding of the purpose of library versions. Instead, use the +# -release flag (see Release numbers), but be warned that every release of +# your package will not be binary compatible with any other release. +# +# see http://www.gnu.org/software/libtool/manual.html#SEC32 for explanation +librrd_la_LDFLAGS = -version-info 2:99:0 -librrd_la_LIBADD = $(RRD_LIBS) -librrd_la_LDFLAGS = -version-info 1:2:0 +librrd_th_la_SOURCES = $(UPD_C_FILES) $(RRD_C_FILES) rrd_thread_safe.c +librrd_th_la_CFLAGS = $(MULTITHREAD_CFLAGS) +librrd_th_la_LDFLAGS = $(MULTITHREAD_LDFLAGS) -version-info 2:99:0 +librrd_th_la_LIBADD = $(ALL_LIBS) include_HEADERS = rrd.h -librrd_private_la_LIBADD = $(RRD_LIBS) -librrd_private_la_LDFLAGS = -static +bin_PROGRAMS = rrdtool rrdupdate -bin_PROGRAMS = rrdcgi rrdtool rrdupdate +if BUILD_RRDCGI +bin_PROGRAMS += rrdcgi +endif rrdcgi_SOURCES = rrd_cgi.c rrdcgi_LDADD = librrd.la -rrdupdate_SOURCES = -rrdupdate_LDADD = rrdupdate.o librrd.la +rrdupdate_SOURCES = rrdupdate.c +rrdupdate_LDADD = librrdupd.la - -rrdupdate.c: rrd_update.c - -ln -s rrd_update.c rrdupdate.c - -rrdupdate.o: rrdupdate.c - $(COMPILE) -DSTANDALONE -c rrdupdate.c - -rrdtool_SOURCES = rrd_tool.c +rrdtool_SOURCES = +rrdtool_DEPENDENCIES = rrd_tool.o librrd.la rrdtool_LDADD = librrd.la -EXTRA_DIST= rrdtool.dsp rrdtool.dsw +# strftime is here because we do not usually need it. unices have propper +# iso date support +EXTRA_DIST= strftime.c strftime.h \ + win32comp.c rrd_thread_safe_nt.c get_ver.awk +