build without librrd

This commit is contained in:
Olaf Rempel 2006-09-30 22:55:04 +02:00
parent dbdb641572
commit 867a97e60e
4 changed files with 21 additions and 8 deletions

View File

@ -1,9 +1,22 @@
# Toplevel Makefile
SAMMLER_SRC := sammler.c configfile.c logging.c network.c rrdtool.c plugins.c
PLUGIN_SRC := $(wildcard p_*.c)
CFLAGS := -O2 -Wall
LDFLAGS := -ldl -lrrd -rdynamic
WITH_RRD = yes
# ############################
SAMMLER_SRC := sammler.c configfile.c logging.c network.c plugins.c
PLUGIN_SRC := p_ctstat.c p_load.c p_memory.c p_mount.c p_netdev.c p_random.c
PLUGIN_SRC += p_rtstat.c p_stat.c p_uptime.c p_vmstat.c
CFLAGS := -O2 -Wall
LDFLAGS := -ldl -rdynamic
# ############################
ifeq ("$(WITH_RRD)", "yes")
SAMMLER_SRC += rrdtool.c
CFLAGS += -DWITH_RRD
LDFLAGS += -lrrd
endif
# ############################

View File

@ -39,7 +39,6 @@ void net_submit(char *hostname, char *plugin, char *filename, int ds_id, char *d
list_for_each_entry(entry, &fwd_list, list)
sendto(entry->sock, tx_buf, size +1, 0, (struct sockaddr *)&entry->sa, sizeof(entry->sa));
// log_print(LOG_DEBUG, "net_submit: %s", tx_buf);
}
int net_receive(int socket)
@ -72,7 +71,6 @@ int net_receive(int socket)
*data++ = '\0';
// log_print(LOG_DEBUG, "net_receive: %s|%s|%s|%d|%s", hostname, plugin, filename, atoi(ds_id), data);
rrd_submit(hostname, plugin, filename, atoi(ds_id), data);
return 0;

View File

@ -76,8 +76,6 @@ static int do_rrd(int mode, char *cmd)
int argc;
char *argv[ARGCMAX];
// log_print(LOG_DEBUG, "do_rrd: %s", cmd);
argc = strsplit(cmd, argv, ARGCMAX -1);
argv[argc] = NULL;

View File

@ -1,6 +1,10 @@
#ifndef _RRDTOOL_H_
#define _RRDTOOL_H_
#ifdef WITH_RRD
void rrd_submit(char *hostname, char *plugin, char *filename, int ds_id, char *data);
#else
#define rrd_submit(hostname, plugin, filename, ds_id, data)
#endif
#endif /* _RRDTOOL_H_ */