Commit b1e16cc2 authored by Yathindra Naik's avatar Yathindra Naik

Added build related clientside changes to disk agent

parent 26b55769
......@@ -9,7 +9,7 @@ OBJDIR = @top_builddir@
SUBDIR = $(subst $(TESTBED_SRCDIR)/,,$(SRCDIR))
SYSTEM := $(shell uname -s)
PROGRAMS = program-agent
PROGRAMS = disk-agent
include $(OBJDIR)/Makeconf
......@@ -25,9 +25,9 @@ CFLAGS += -I/usr/local/include
CFLAGS += -DHAVE_PUBSUB
CFLAGS += -DCLIENT_BINDIR='"$(CLIENT_BINDIR)"'
LDFLAGS += -g -L${TESTBED_LIBOBJDIR}/event -L${TESTBED_LIBOBJDIR}/libtb
LIBS += -levent -ltb -lcrypto
LIBS += -L/usr/local/lib -lpubsub
LDFLAGS += -g -L${TESTBED_LIBOBJDIR}/event -L${TESTBED_LIBOBJDIR}/libtb
LIBS += -levent -ltb -lcrypto -ldevmapper
LIBS += -L/usr/local/lib -lpubsub -ldevmapper
LDFLAGS += $(LDSTATIC)
# Deal with the presence/absence of kerberos in the linux ssl library
......@@ -46,31 +46,24 @@ endif
endif
LIBS += -ldl
endif
CXXFLAGS = $(CFLAGS)
version.c: program-agent.c
echo >$@ "char build_info[] = \"Built on `date +%d-%b-%Y` by `id -nu`@`hostname | sed 's/\..*//'`:`pwd`\";"
program-agent-debug: program-agent.o version.o
$(CC) $(LDFLAGS) -o $@ program-agent.o version.o $(LIBS)
disk-agent-debug: disk-agent.o version.o
$(CC) $(LDFLAGS) -o $@ disk-agent.o version.o $(LIBS)
$(PROGRAMS): ${TESTBED_LIBOBJDIR}/event/libevent.a \
${TESTBED_LIBSRCDIR}/event/event.h
boss-install: $(INSTALL_DIR)/opsdir/sbin/program-agent
-mkdir -p $(INSTALL_DIR)/opsdir/man/man8
$(INSTALL) -m 0644 $(SRCDIR)/program-agent.8 \
$(INSTALL_DIR)/opsdir/man/man8/program-agent.8
boss-install: $(INSTALL_DIR)/opsdir/sbin/disk-agent
control-install: $(INSTALL_SBINDIR)/program-agent
control-install: $(INSTALL_SBINDIR)/disk-agent
post-install:
client: $(PROGRAMS)
client-install: client
$(INSTALL_PROGRAM) program-agent$(EXE) $(DESTDIR)$(CLIENT_BINDIR)/program-agent$(EXE)
chmod u+s-w $(DESTDIR)$(CLIENT_BINDIR)/program-agent
-mkdir -p $(DESTDIR)$(CLIENT_MANDIR)/man8
$(INSTALL) -m 644 $(SRCDIR)/program-agent.8 $(DESTDIR)$(CLIENT_MANDIR)/man8/program-agent.8
$(INSTALL_PROGRAM) disk-agent$(EXE) $(DESTDIR)$(CLIENT_BINDIR)/disk-agent$(EXE)
chmod u+s-w $(DESTDIR)$(CLIENT_BINDIR)/disk-agent
clean:
/bin/rm -f *.o $(PROGRAMS)
......
......@@ -28,6 +28,10 @@ extern "C" {
#include <libdevmapper.h>
}
#ifdef HAVE_ELVIN
#include <elvin/elvin.h>
#endif
#include <sys/time.h>
using namespace std;
......
......@@ -29,6 +29,14 @@ if ($EUID != 0) {
" Must be root to run this script!\n");
}
#
# Load the OS independent support library. It will load the OS dependent
# library and initialize itself.
#
use libsetup;
use libtmcc;
use librc;
# Script specific goo.
my $LOGFILE = LOGDIR() . "/diskgent.debug";
my $WRAPLOG = LOGDIR() . "/diskwrap.debug";
......@@ -38,14 +46,6 @@ my $PAGENT = "$BINDIR/disk-agent";
my $TOKEN = "/var/tmp/diskagent-token";
#
# Load the OS independent support library. It will load the OS dependent
# library and initialize itself.
#
use libsetup;
use libtmcc;
use librc;
#
# Not all clients support this.
#
......
......@@ -7471,6 +7471,7 @@ outfiles="$outfiles clientside/GNUmakefile \
clientside/lib/tmcd/GNUmakefile \
clientside/GNUmakefile clientside/event/GNUmakefile \
clientside/event/program-agent/GNUmakefile \
clientside/event/disk-agent/GNUmakefile \
clientside/tools/GNUmakefile clientside/tools/pcapper/GNUmakefile \
clientside/sensors/GNUmakefile clientside/sensors/slothd/GNUmakefile \
clientside/sensors/slothd/sdisrunning clientside/sensors/slothd/sddeploy \
......
......@@ -1175,6 +1175,7 @@ outfiles="$outfiles clientside/GNUmakefile \
clientside/lib/tmcd/GNUmakefile \
clientside/GNUmakefile clientside/event/GNUmakefile \
clientside/event/program-agent/GNUmakefile \
clientside/event/disk-agent/GNUmakefile \
clientside/tools/GNUmakefile clientside/tools/pcapper/GNUmakefile \
clientside/sensors/GNUmakefile clientside/sensors/slothd/GNUmakefile \
clientside/sensors/slothd/sdisrunning clientside/sensors/slothd/sddeploy \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment