index c7aea977a1f2bda64f3f9b7c36d970af0b5c5dbf..75a29d57d2326772ddfe8cc643ee8c288136887c 100644 (file)
--- a/program/src/Makefile.am
+++ b/program/src/Makefile.am
#
#ACLOCAL_M4 = $(top_srcdir)/config/aclocal.m4
#AUTOHEADER = @AUTOHEADER@ --localdir=$(top_srcdir)/config
#
#ACLOCAL_M4 = $(top_srcdir)/config/aclocal.m4
#AUTOHEADER = @AUTOHEADER@ --localdir=$(top_srcdir)/config
-
-CGI_LIB_DIR = $(top_srcdir)/@CGI_LIB_DIR@
-GD_LIB_DIR = $(top_srcdir)/@GD_LIB_DIR@
-PNG_LIB_DIR = $(top_srcdir)/@PNG_LIB_DIR@
-ZLIB_LIB_DIR = $(top_srcdir)/@ZLIB_LIB_DIR@
-
-INCLUDES = -I$(CGI_LIB_DIR) -I$(GD_LIB_DIR) -I$(PNG_LIB_DIR) -I$(ZLIB_LIB_DIR)
-
-#COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(CFLAGS_EXTRA)
-#LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(CFLAGS_EXTRA)
-#LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(CFLAGS_EXTRA) $(LDFLAGS) -o $@
+DEFS += -DMAKE_TIMESTAMP=\""$(shell date)"\"
+if USE_INSTALLED_libcgi
+CGI_LIB = -lcgi
+else
+CGI_LIB = $(top_srcdir)/libraries/@CGI_LIB_DIR@/librrd_cgi.la
+CGI_INCLUDES = -I$(top_srcdir)/libraries/@CGI_LIB_DIR@
+endif
+if USE_INSTALLED_libfreetype
+FREETYPE_LIB = -lfreetype
+else
+FREETYPE_LIB = $(top_srcdir)/libraries/@FREETYPE_LIB_DIR@/librrd_freetype.la
+FREETYPE_INCLUDES = -I$(top_srcdir)/libraries/@FREETYPE_LIB_DIR@/include
+endif
+if USE_INSTALLED_libart_lgpl
+ART_LIB = -lart_lgpl
+else
+ART_LIB = $(top_srcdir)/libraries/@ART_LIB_DIR@/librrd_art.la
+ART_INCLUDES = -I$(top_srcdir)/libraries/@ART_LIB_DIR@
+endif
+if USE_INSTALLED_libpng
+PNG_LIB = -lpng
+else
+PNG_LIB = $(top_srcdir)/libraries/@PNG_LIB_DIR@/librrd_png.la
+PNG_INCLUDES = -I$(top_srcdir)/libraries/@PNG_LIB_DIR@
+endif
+if USE_INSTALLED_libz
+ZLIB_LIB = -lz
+else
+ZLIB_LIB = $(top_srcdir)/libraries/@ZLIB_LIB_DIR@/librrd_z.la
+ZLIB_INCLUDES = -I$(top_srcdir)/libraries/@ZLIB_LIB_DIR@
+endif
+
+INCLUDES = $(CGI_INCLUDES) $(FREETYPE_INCLUDES) $(ART_INCLUDES) \
+ $(PNG_INCLUDES) $(ZLIB_INCLUDES)
RRD_C_FILES = \
RRD_C_FILES = \
- gdpng.c \
getopt.c \
getopt1.c \
getopt.c \
getopt1.c \
- gifsize.c \
parsetime.c \
hash_32.c \
rrd_hw.c \
parsetime.c \
hash_32.c \
rrd_hw.c \
rrd_fetch.c \
rrd_format.c \
rrd_graph.c \
rrd_fetch.c \
rrd_format.c \
rrd_graph.c \
+ rrd_graph_helper.c \
rrd_last.c \
rrd_open.c \
rrd_resize.c \
rrd_last.c \
rrd_open.c \
rrd_resize.c \
rrd_rpncalc.c \
rrd_tune.c \
rrd_update.c \
rrd_rpncalc.c \
rrd_tune.c \
rrd_update.c \
- getopt.h ntconfig.h parsetime.h rrd_format.h rrd_tool.h rrd.h rrd_hw.h rrd_rpncalc.h
+ rrd_xport.c \
+ rrd_nan_inf.c \
+ rrd_gfx.c rrd_gfx.h \
+ rrd_afm.c rrd_afm_data.c \
+ getopt.h ntconfig.h parsetime.h \
+ rrd_format.h rrd_tool.h rrd_xport.h rrd.h rrd_hw.h rrd_rpncalc.h \
+ rrd_tool.c \
+ rrd_nan_inf.h fnv.h rrd_graph.h rrd_afm.h rrd_afm_data.h \
+ rrd_is_thread_safe.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
# Build two libraries. One is a public one that gets installed in
# $prefix/lib. Libtool does not create an archive of the PIC compiled
# files.
RRD_LIBS = \
# files.
RRD_LIBS = \
- $(CGI_LIB_DIR)/librrd_cgi.la \
- $(GD_LIB_DIR)/librrd_gd.la \
- $(PNG_LIB_DIR)/librrd_png.la \
- $(ZLIB_LIB_DIR)/librrd_z.la
+ $(CGI_LIB) \
+ $(FREETYPE_LIB) \
+ $(ART_LIB) \
+ $(PNG_LIB) \
+ $(ZLIB_LIB)
-lib_LTLIBRARIES = librrd.la
+lib_LTLIBRARIES = librrd.la librrd_th.la
noinst_LTLIBRARIES = librrd_private.la
noinst_LTLIBRARIES = librrd_private.la
-librrd_la_SOURCES = $(RRD_C_FILES)
-librrd_private_la_SOURCES = $(RRD_C_FILES)
+librrd_la_SOURCES = $(RRD_C_FILES) rrd_not_thread_safe.c
+librrd_private_la_SOURCES = $(RRD_C_FILES) rrd_not_thread_safe.c
librrd_la_LIBADD = $(RRD_LIBS)
librrd_la_LIBADD = $(RRD_LIBS)
-librrd_la_LDFLAGS = -version-info 0:0:0
+librrd_la_LDFLAGS = -version-info 1:2:0
+
+librrd_th_la_SOURCES = $(RRD_C_FILES) rrd_thread_safe.c
+librrd_th_la_LIBADD = $(RRD_LIBS) -lpthread
+librrd_th_la_LDFLAGS = -version-info 1:2:0
+
include_HEADERS = rrd.h
include_HEADERS = rrd.h
rrdupdate_SOURCES =
rrdupdate_LDADD = rrdupdate.o librrd.la
rrdupdate_SOURCES =
rrdupdate_LDADD = rrdupdate.o librrd.la
-
rrdupdate.c: rrd_update.c
-ln -s rrd_update.c rrdupdate.c
rrdupdate.o: rrdupdate.c
$(COMPILE) -DSTANDALONE -c rrdupdate.c
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
rrdtool_LDADD = librrd.la
EXTRA_DIST= rrdtool.dsp rrdtool.dsw
rrdtool_LDADD = librrd.la
EXTRA_DIST= rrdtool.dsp rrdtool.dsw