Added "step=1800" and such to "DEF"
[rrdtool.git] / src / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2
3 #AUTOMAKE_OPTIONS   = foreign
4 #
5 #ACLOCAL_M4        = $(top_srcdir)/config/aclocal.m4
6 #AUTOHEADER = @AUTOHEADER@ --localdir=$(top_srcdir)/config
7
8 if USE_INSTALLED_libcgi
9 CGI_LIB            = -lcgi
10 else
11 CGI_LIB            = $(top_srcdir)/libraries/@CGI_LIB_DIR@/librrd_cgi.la
12 CGI_INCLUDES       = -I$(top_srcdir)/libraries/@CGI_LIB_DIR@
13 endif
14 if USE_INSTALLED_libfreetype
15 FREETYPE_LIB       = -lfreetype
16 else
17 FREETYPE_LIB       = $(top_srcdir)/libraries/@FREETYPE_LIB_DIR@/librrd_freetype.la
18 FREETYPE_INCLUDES  = -I$(top_srcdir)/libraries/@FREETYPE_LIB_DIR@/include
19 endif
20 if USE_INSTALLED_libart_lgpl
21 ART_LIB            = -lart_lgpl
22 else
23 ART_LIB            = $(top_srcdir)/libraries/@ART_LIB_DIR@/librrd_art.la
24 ART_INCLUDES       = -I$(top_srcdir)/libraries/@ART_LIB_DIR@
25 endif
26 if USE_INSTALLED_libpng
27 PNG_LIB            = -lpng
28 else
29 PNG_LIB            = $(top_srcdir)/libraries/@PNG_LIB_DIR@/librrd_png.la
30 PNG_INCLUDES       = -I$(top_srcdir)/libraries/@PNG_LIB_DIR@
31 endif
32 if USE_INSTALLED_libz
33 ZLIB_LIB           = -lz
34 else
35 ZLIB_LIB           = $(top_srcdir)/libraries/@ZLIB_LIB_DIR@/librrd_z.la
36 ZLIB_INCLUDES      = -I$(top_srcdir)/libraries/@ZLIB_LIB_DIR@
37 endif
38
39 INCLUDES = $(CGI_INCLUDES) $(FREETYPE_INCLUDES) $(ART_INCLUDES) \
40            $(PNG_INCLUDES) $(ZLIB_INCLUDES)
41
42 RRD_C_FILES =           \
43         getopt.c        \
44         getopt1.c       \
45         parsetime.c     \
46         hash_32.c       \
47         rrd_hw.c        \
48         pngsize.c       \
49         rrd_create.c    \
50         rrd_diff.c      \
51         rrd_dump.c      \
52         rrd_info.c      \
53         rrd_error.c     \
54         rrd_fetch.c     \
55         rrd_format.c    \
56         rrd_graph.c     \
57         rrd_graph_helper.c      \
58         rrd_last.c      \
59         rrd_open.c      \
60         rrd_resize.c    \
61         rrd_restore.c   \
62         rrd_rpncalc.c \
63         rrd_tune.c      \
64         rrd_update.c    \
65         rrd_xport.c     \
66         rrd_nan_inf.c   \
67         rrd_gfx.c rrd_gfx.h \
68         rrd_afm.c rrd_afm_data.c \
69         getopt.h ntconfig.h parsetime.h \
70         rrd_format.h rrd_tool.h rrd_xport.h rrd.h rrd_hw.h rrd_rpncalc.h
71
72 # Build two libraries.  One is a public one that gets installed in
73 # $prefix/lib.  Libtool does not create an archive of the PIC compiled
74 # objects for this library type.  The second library is a private one
75 # meant to build the RRDs.so for perl-shared.  In this case libtool
76 # creates a ./.lib/*.al file that contains the PIC compiled object
77 # files.
78
79 RRD_LIBS =                              \
80         $(CGI_LIB)      \
81         $(FREETYPE_LIB) \
82         $(ART_LIB)      \
83         $(PNG_LIB)      \
84         $(ZLIB_LIB)
85
86 lib_LTLIBRARIES           = librrd.la
87 noinst_LTLIBRARIES        = librrd_private.la
88
89 librrd_la_SOURCES         = $(RRD_C_FILES)
90 librrd_private_la_SOURCES = $(RRD_C_FILES)
91
92 librrd_la_LIBADD          = $(RRD_LIBS)
93 librrd_la_LDFLAGS         = -version-info 1:2:0
94
95 include_HEADERS = rrd.h
96
97 librrd_private_la_LIBADD  = $(RRD_LIBS)
98 librrd_private_la_LDFLAGS = -static
99
100 bin_PROGRAMS    = rrdcgi rrdtool rrdupdate
101
102 rrdcgi_SOURCES  = rrd_cgi.c
103 rrdcgi_LDADD    = librrd.la
104
105 rrdupdate_SOURCES = 
106 rrdupdate_LDADD = rrdupdate.o librrd.la
107
108
109 rrdupdate.c: rrd_update.c
110         -ln -s rrd_update.c rrdupdate.c
111
112 rrdupdate.o: rrdupdate.c
113         $(COMPILE) -DSTANDALONE -c rrdupdate.c
114
115 rrdtool_SOURCES = rrd_tool.c
116 rrdtool_LDADD   = librrd.la
117
118 EXTRA_DIST= rrdtool.dsp rrdtool.dsw