Commit f4ffc726 authored by Mike Hibler's avatar Mike Hibler

Mega changes to change default to dynamic linking for event agents and other

things for which we previously linked -static.

Fixup some clean targets in a couple of cases as well.

Get capture to compile without SSL (capture-nossl).  This is untested.
parent 420ea0b9
......@@ -35,6 +35,13 @@ SUBDIRS = lib db assign www @optional_subdirs@ ipod security sensors \
all: all-subdirs
#
# We used to statically link our event agents. We no longer do this, but
# if you want "old style" agents, use this target.
#
all-static:
@LDSTATIC=-static $(MAKE) all
install:
@echo "Choose either boss-install, ops-install or fs-install"
@echo "Choose opsfs-install instead of ops-install for a combined ops/fs machine"
......
......@@ -13,13 +13,6 @@ SYSTEM := $(shell uname -s)
include $(OBJDIR)/Makeconf
ifeq ($(NOSTATIC),)
# for now we link everything static
LDSTATIC = -static
else
LDSTATIC =
endif
all: boss-all tipserv-all
boss-all: capserver
tipserv-all: capture capture-tty capquery
......@@ -34,25 +27,24 @@ DBFLAGS += -I/usr/local/include -I$(TESTBED_SRCDIR)/lib/libtb
# due to the output device/pty being full.
#
CFLAGS += -Wall -g -O2 -DLOG_DROPS -I${OBJDIR} -DLOG_TESTBED=$(LOG_TESTBED)
LDFLAGS += $(LDSTATIC)
ifeq ($(SYSTEM),Linux)
ifeq ($(host_cpu),arm)
else
NEEDKERB := $(shell nm /usr/lib/libssl.a | grep -q krb; echo $$?)
ifeq ($(NEEDKERB),0)
CFLAGS += `/usr/kerberos/bin/krb5-config --cflags`
LIBS += `/usr/kerberos/bin/krb5-config --libs krb5`
ifneq ($(wildcard /usr/kerberos/bin/krb5-config),)
CFLAGS += `/usr/kerberos/bin/krb5-config --cflags`
LIBS += `/usr/kerberos/bin/krb5-config --libs krb5`
ifneq ($(wildcard /usr/lib/libkrb5support.a),)
LIBS += -lkrb5support
endif
endif
else
LDFLAGS += $(LDSTATIC)
LIBS += -ldl -lz
endif
capture: capture.c capdecls.h
$(CC) $(CFLAGS) -DUSESOCKETS -DWITHSSL -DPREFIX=\"$(TBROOT)\" -o capture $< -lssl -lcrypto $(LDFLAGS)
$(CC) $(CFLAGS) -DUSESOCKETS -DWITHSSL -DPREFIX=\"$(TBROOT)\" -o capture $< $(LDFLAGS) -lssl -lcrypto $(LIBS)
capquery: capquery.c capdecls.h
$(CC) $(CFLAGS) -DPREFIX=\"$(TBROOT)\" -o $@ $<
$(CC) $(CFLAGS) -DPREFIX=\"$(TBROOT)\" -o $@ $< $(LDFLAGS) $(LIBS)
capture-nossl: capture.c capdecls.h
$(CC) $(CFLAGS) -DUSESOCKETS -DPREFIX=\"$(TBROOT)\" -o capture-nossl $<
......@@ -80,4 +72,4 @@ real-install: all $(INSTALL_SBINDIR)/capserver $(INSTALL_SBINDIR)/capture
tipserv-install: tipserv-all $(INSTALL_SBINDIR)/capture
clean:
rm -f *.o capture capture-tty capserver core errs Errs
rm -f *.o capture capture-tty capserver capquery core errs Errs
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2000-2006 University of Utah and the Flux Group.
* Copyright (c) 2000-2007 University of Utah and the Flux Group.
* All rights reserved.
*/
......@@ -543,6 +543,7 @@ main(int argc, char **argv)
key.keylen = strlen(key.key);
if (write(ptyfd, &key, sizeof(key)) != sizeof(key))
die("write(): %s", geterr(errno));
#ifdef WITHSSL
initializessl();
sslRelay = SSL_new(ctx);
if (!sslRelay)
......@@ -553,6 +554,7 @@ main(int argc, char **argv)
die("SSL_connect()");
if (sslverify(sslRelay, "Capture Server"))
die("SSL connection did not verify");
#endif
if (fcntl(ptyfd, F_SETFL, O_NONBLOCK) < 0)
die("fcntl(O_NONBLOCK): %s", geterr(errno));
tipactive = 1;
......@@ -978,12 +980,14 @@ dropped:
for (lcc = 0; lcc < cc; lcc += i) {
if (relay_rcv) {
#ifdef USESOCKETS
#ifdef WITHSSL
if (sslRelay != NULL) {
i = SSL_write(sslRelay,
&buf[lcc],
cc - lcc);
}
else {
} else
#endif
{
i = cc - lcc;
}
#endif
......@@ -1475,12 +1479,14 @@ clientconnect(void)
{
struct sockaddr_in sin;
int cc, length = sizeof(sin);
int dorelay = 0, doupload = 0;
int ret;
int newfd;
secretkey_t key;
capret_t capret;
#ifdef WITHSSL
int dorelay = 0, doupload = 0;
int ret;
SSL *newssl;
#endif
newfd = accept(sockfd, (struct sockaddr *)&sin, &length);
if (newfd < 0) {
......@@ -1740,7 +1746,13 @@ handleupload(void)
int drop = 0, rc, retval = 0;
char buffer[BUFSIZE];
if ((rc = SSL_read(sslUpload, buffer, sizeof(buffer))) < 0) {
#ifdef WITHSSL
rc = SSL_read(sslUpload, buffer, sizeof(buffer));
#else
/* XXX no clue if this is correct */
rc = read(upfd, buffer, sizeof(buffer));
#endif
if (rc < 0) {
if ((errno != EINTR) && (errno != EAGAIN)) {
drop = 1;
}
......@@ -1764,8 +1776,10 @@ handleupload(void)
}
if (drop) {
#ifdef WITHSSL
SSL_free(sslUpload);
sslUpload = NULL;
#endif
FD_CLR(upfd, &sfds);
close(upfd);
upfd = -1;
......
......@@ -12,13 +12,6 @@ SUBDIR = cdrom/groklilo
include $(OBJDIR)/Makeconf
ifeq ($(NOSTATIC),)
# for now we link everything static
LDSTATIC = -static
else
LDSTATIC =
endif
all: groklilo
include $(TESTBED_SRCDIR)/GNUmakerules
......
......@@ -19,7 +19,7 @@ CFLAGS += -O -g -Wall -I${OBJDIR}
LFLAGS += -lz
tbbootconfig: tbbootconfig.c
$(CC) $(CFLAGS) -static -g -o tbbootconfig $< $(LFLAGS)
$(CC) $(CFLAGS) $(LDSTATIC) -g -o tbbootconfig $< $(LFLAGS)
client: tbbootconfig
......
......@@ -11,13 +11,6 @@ SUBDIR = event/delay-agent
include $(OBJDIR)/Makeconf
ifeq ($(NOSTATIC),)
# for now we link everything static
LDSTATIC = -static
else
LDSTATIC =
endif
all: delay-agent
include $(TESTBED_SRCDIR)/GNUmakerules
......
......@@ -19,11 +19,11 @@ all: $(PROGRAMS)
include $(TESTBED_SRCDIR)/GNUmakerules
CFLAGS += -DDEBUG
CFLAGS += -O -g -static -Wall
CFLAGS += -O -g -Wall
CFLAGS += -I. -I${OBJDIR} -I$(SRCDIR)/../lib -I$(TESTBED_SRCDIR)/lib/libtb
CFLAGS += -I/usr/local/include
LDFLAGS += -static -L../lib -L${OBJDIR}/lib/libtb
LDFLAGS += $(LDSTATIC) -L../lib -L${OBJDIR}/lib/libtb
LIBS += -levent -ltb -lcrypto
LIBS += -L/usr/local/lib -lpubsub -lm
ifeq ($(SYSTEM),Linux)
......
......@@ -13,7 +13,7 @@ include $(OBJDIR)/Makeconf
PUBSUBFLAGS = -I/usr/local/include
PUBSUBMTFLAGS = -I/usr/local/include
PUBSUBLIB = /usr/local/lib/libpubsub.so
PUBSUBLIB = -L/usr/local/lib -lpubsub
ifeq ($(ELVIN_COMPAT),1)
PUBSUBFLAGS += -DELVIN_COMPAT
......@@ -38,11 +38,11 @@ include $(TESTBED_SRCDIR)/GNUmakerules
PERLVERS := $(shell $(SRCDIR)/perlvers.pl)
#CFLAGS += -DDEBUG
CFLAGS += -O2 -g -static -I. -Wall
CFLAGS += -O2 -g -I. -Wall
SCFLAGS = $(CFLAGS) $(PUBSUBFLAGS)
TCFLAGS = $(CFLAGS) $(PUBSUBMTFLAGS)
# Special CFLAGS w/o warnings, for SWIG-generated code
CFLAGS_NOWARN += -O2 -g -static -I. $(PUBSUBFLAGS)
CFLAGS_NOWARN += -O2 -g -I. $(PUBSUBFLAGS)
ifeq ($(SYSTEM),Linux)
PCORE = -I/usr/lib/perl5/5.6.1/i386-linux/CORE
PCORE += -I/usr/lib/perl5/5.8.3/i386-linux-thread-multi/CORE
......
......@@ -14,13 +14,6 @@ PROGRAMS = link-agent
include $(OBJDIR)/Makeconf
ifeq ($(NOSTATIC),)
# for now we link everything static
LDSTATIC = -static
else
LDSTATIC =
endif
all: $(PROGRAMS)
include $(TESTBED_SRCDIR)/GNUmakerules
......@@ -33,29 +26,26 @@ CFLAGS += -I/usr/local/include
LDFLAGS += -L../lib -L${OBJDIR}/lib/libtb
LIBS += -levent -ltb -lcrypto
LIBS += -L/usr/local/lib -lpubsub -lm
ifeq ($(host_cpu),arm)
else
LDFLAGS += $(LDSTATIC)
# Deal with the presence/absence of kerberos in the linux ssl library
ifeq ($(SYSTEM),Linux)
ifeq ($(NOSTATIC),)
NEEDKERB := $(shell nm /usr/lib/libssl.a | grep -q krb; echo $$?)
ifneq ($(LDSTATIC),)
NOKERB := $(shell nm /usr/lib/libssl.a | grep -q krb; echo $$?)
else
NEEDKERB := 1
NOKERB := 1
endif
ifeq ($(NEEDKERB),0)
CFLAGS += `/usr/kerberos/bin/krb5-config --cflags`
LIBS += `/usr/kerberos/bin/krb5-config --libs krb5`
ifeq ($(NOKERB),0)
CFLAGS += `/usr/kerberos/bin/krb5-config --cflags`
LIBS += `/usr/kerberos/bin/krb5-config --libs krb5`
ifneq ($(wildcard /usr/lib/libkrb5support.a),)
LIBS += -lkrb5support
endif
LIBS += -lkrb5support
endif
LIBS += -ldl -lz
endif
endif
ifeq ($(SYSTEM),Linux)
LIBS += -ldl
LIBS += -ldl -lz
endif
link-agent-debug: link-agent.o
......@@ -70,4 +60,4 @@ client-install: client
$(INSTALL_PROGRAM) link-agent$(EXE) $(DESTDIR)$(CLIENT_BINDIR)/link-agent$(EXE)
clean:
/bin/rm -f *.o $(PROGRAMS)
/bin/rm -f *.o $(PROGRAMS) *-debug
......@@ -30,13 +30,6 @@ SYSTEM := $(patsubst CYGWIN%,CYGWIN,$(shell uname -s))
include $(OBJDIR)/Makeconf
ifeq ($(NOSTATIC),)
# for now we link everything static
LDSTATIC = -static
else
LDSTATIC =
endif
all: binaries $(SCRIPT) $(SCRIPT_RUN) $(SCRIPT_PROXY) \
weblinktest linktest_control
......@@ -50,25 +43,26 @@ CFLAGS += -I/usr/local/include
LDFLAGS += -L../lib -L${OBJDIR}/lib/libtb
LIBS += -levent -lcrypto -lssl
LIBS += -L/usr/local/lib -lpubsub -lm
ifeq ($(host_cpu),arm)
else
LDFLAGS += $(LDSTATIC)
# Deal with the presence/absence of kerberos in the linux ssl library
ifeq ($(SYSTEM),Linux)
ifeq ($(NOSTATIC),)
NEEDKERB := $(shell nm /usr/lib/libssl.a | grep -q krb; echo $$?)
ifneq ($(LDSTATIC),)
NOKERB := $(shell nm /usr/lib/libssl.a | grep -q krb; echo $$?)
else
NEEDKERB := 1
NOKERB := 1
endif
ifeq ($(NEEDKERB),0)
CFLAGS += `/usr/kerberos/bin/krb5-config --cflags`
LIBS += `/usr/kerberos/bin/krb5-config --libs krb5`
ifeq ($(NOKERB),0)
CFLAGS += `/usr/kerberos/bin/krb5-config --cflags`
LIBS += `/usr/kerberos/bin/krb5-config --libs krb5`
ifneq ($(wildcard /usr/lib/libkrb5support.a),)
LIBS += -lkrb5support
LIBS += -lkrb5support
endif
endif
LIBS += -ldl -lz
endif
ifeq ($(SYSTEM),Linux)
LIBS += -ldl -lz
endif
LIBTB_OBJS = $(LIBTBDIR)/log.o $(LIBTBDIR)/tbdefs.o $(LIBTBDIR)/be_user.o
......@@ -151,6 +145,7 @@ client-install: client
$(MAKE) -C rude client-install
clean:
rm -f *.o $(TESTS) $(SCRIPT) $(SCRIPT_RUN) weblinktest linktest_control
rm -f *.o *-debug $(TESTS) $(SCRIPT) $(SCRIPT_RUN) $(SCRIPT_PROXY) \
weblinktest linktest_control $(DAEMON) $(LTEVENT) version.c
-$(MAKE) -C iperf clean
-$(MAKE) -C rude clean
......@@ -14,13 +14,6 @@ PROGRAMS = program-agent
include $(OBJDIR)/Makeconf
ifeq ($(NOSTATIC),)
# for now we link everything static
LDSTATIC = -static
else
LDSTATIC =
endif
all: $(PROGRAMS)
include $(TESTBED_SRCDIR)/GNUmakerules
......@@ -37,25 +30,23 @@ LDFLAGS += -g -L../lib -L${OBJDIR}/lib/libtb
LIBS += -levent -ltb -lcrypto
#LIBS += `$(ELVIN_CONFIG) --libs vin4c`
LIBS += -L/usr/local/lib -lpubsub
ifeq ($(host_cpu),arm)
else
LDFLAGS += $(LDSTATIC)
# Deal with the presence/absence of kerberos in the linux ssl library
ifeq ($(SYSTEM),Linux)
ifeq ($(NOSTATIC),)
NEEDKERB := $(shell nm /usr/lib/libssl.a | grep -q krb; echo $$?)
ifneq ($(LDSTATIC),)
NOKERB := $(shell nm /usr/lib/libssl.a | grep -q krb; echo $$?)
else
NEEDKERB := 1
NOKERB := 1
endif
ifeq ($(NEEDKERB),0)
CFLAGS += `/usr/kerberos/bin/krb5-config --cflags`
LIBS += `/usr/kerberos/bin/krb5-config --libs krb5`
ifeq ($(NOKERB),0)
CFLAGS += `/usr/kerberos/bin/krb5-config --cflags`
LIBS += `/usr/kerberos/bin/krb5-config --libs krb5`
ifneq ($(wildcard /usr/lib/libkrb5support.a),)
LIBS += -lkrb5support
endif
LIBS += -lkrb5support
endif
LIBS += -ldl -lz
endif
LIBS += -ldl
endif
version.c: program-agent.c
......
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2005, 2007 University of Utah and the Flux Group.
# Copyright (c) 2000-2007 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -17,13 +17,6 @@ endif
include $(OBJDIR)/Makeconf
ifeq ($(NOSTATIC),)
# for now we link everything static
LDSTATIC = -static
else
LDSTATIC =
endif
all: $(PROGRAMS)
include $(TESTBED_SRCDIR)/GNUmakerules
......@@ -54,26 +47,26 @@ LDFLAGS += -L$(OBJDIR)/lib -L$(OBJDIR)/lib/libtb -L../lib
LIBS += -levent_r -ltb -lcrypto
LIBS += -L/usr/local/lib -lpubsub_r -lm
CPPC = g++
ifeq ($(host_cpu),arm)
else
LDFLAGS += $(LDSTATIC)
PLDFLAGS += $(LDSTATIC)
# Deal with the presence/absence of kerberos in the linux ssl library
ifeq ($(SYSTEM),Linux)
ifeq ($(NOSTATIC),)
NEEDKERB := $(shell nm /usr/lib/libssl.a | grep -q krb; echo $$?)
ifneq ($(LDSTATIC),)
NOKERB := $(shell nm /usr/lib/libssl.a | grep -q krb; echo $$?)
else
NEEDKERB := 1
NOKERB := 1
endif
ifeq ($(NEEDKERB),0)
CFLAGS += `/usr/kerberos/bin/krb5-config --cflags`
LIBS += `/usr/kerberos/bin/krb5-config --libs krb5`
ifeq ($(NOKERB),0)
CFLAGS += `/usr/kerberos/bin/krb5-config --cflags`
LIBS += `/usr/kerberos/bin/krb5-config --libs krb5`
ifneq ($(wildcard /usr/lib/libkrb5support.a),)
LIBS += -lkrb5support
LIBS += -lkrb5support
endif
endif
LIBS += -ldl -lz
endif
ifeq ($(SYSTEM),Linux)
LIBS += -ldl -lz
endif
PLDFLAGS = -pthread
......
......@@ -24,6 +24,7 @@ CFLAGS += -I/usr/local/include
LDFLAGS += -pthread
LDFLAGS += -L../lib -L${OBJDIR}/lib/libtb
LDFLAGS += $(LDSTATIC)
DBLIBS = -L/usr/local/lib/mysql -lmysqlclient -lz
LIBS += -levent_r -ltb -lz
......@@ -60,7 +61,7 @@ OBJS = \
version.o
event-sched_rrpc: $(OBJS) event-sched.h ../lib/libevent.a
$(CXX) $(CFLAGS) -static $(LDFLAGS) -o $@ $(OBJS) $(ULXRLIBS) $(LIBS)
$(CXX) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(ULXRLIBS) $(LIBS)
DEPS = \
console-agent.h error-record.h event-sched.h group-agent.h listNode.h \
......
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2005, 2007 University of Utah and the Flux Group.
# Copyright (c) 2000-2007 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -14,13 +14,6 @@ PROGRAMS = tevc
include $(OBJDIR)/Makeconf
ifeq ($(NOSTATIC),)
# for now we link everything static
LDSTATIC = -static
else
LDSTATIC =
endif
all: $(PROGRAMS)
include $(TESTBED_SRCDIR)/GNUmakerules
......@@ -44,25 +37,26 @@ CFLAGS += -I/usr/local/include
LDFLAGS += -L$(OBJDIR)/lib -L$(OBJDIR)/lib/libtb -L../lib
LIBS += -levent -lcrypto
LIBS += -lm -L/usr/local/lib -lpubsub
ifeq ($(host_cpu),arm)
else
LDFLAGS += $(LDSTATIC)
# Deal with the presence/absence of kerberos in the linux ssl library
ifeq ($(SYSTEM),Linux)
ifeq ($(NOSTATIC),)
NEEDKERB := $(shell nm /usr/lib/libssl.a | grep -q krb; echo $$?)
ifneq ($(LDSTATIC),)
NOKERB := $(shell nm /usr/lib/libssl.a | grep -q krb; echo $$?)
else
NEEDKERB := 1
NOKERB := 1
endif
ifeq ($(NEEDKERB),0)
CFLAGS += `/usr/kerberos/bin/krb5-config --cflags`
LIBS += `/usr/kerberos/bin/krb5-config --libs krb5`
ifeq ($(NOKERB),0)
CFLAGS += `/usr/kerberos/bin/krb5-config --cflags`
LIBS += `/usr/kerberos/bin/krb5-config --libs krb5`
ifneq ($(wildcard /usr/lib/libkrb5support.a),)
LIBS += -lkrb5support
LIBS += -lkrb5support
endif
endif
LIBS += -ldl -lz
endif
ifeq ($(SYSTEM),Linux)
LIBS += -ldl -lz
endif
# Link against some of the object files from libtb, instead of the
......@@ -81,7 +75,7 @@ client-install: client
$(INSTALL_PROGRAM) tevc$(EXE) $(DESTDIR)$(CLIENT_BINDIR)/tevc$(EXE)
clean:
rm -f *.o $(PROGRAMS)
rm -f *.o $(PROGRAMS) *-debug
$(INSTALL_DIR)/opsdir/bin/%: %
@echo "Installing $<"
......
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2005, 2007 University of Utah and the Flux Group.
# Copyright (c) 2000-2007 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -32,13 +32,6 @@ OBJS = \
include $(OBJDIR)/Makeconf
ifeq ($(NOSTATIC),)
# for now we link everything static
LDSTATIC = -static
else
LDSTATIC =
endif
all: tg2.0 $(PROGRAMS)
include $(TESTBED_SRCDIR)/GNUmakerules
......@@ -54,13 +47,10 @@ LDFLAGS += -L../lib -L${OBJDIR}/lib/libtb
LIBS += -levent -ltb -lcrypto
# Expand the elvin-config list now so it can be filtered below.
LIBS += -L/usr/local/lib -lpubsub -lm
LDFLAGS += $(LDSTATIC)
SYSTEM := $(shell uname -s)
ifneq ($(host_cpu),arm)
LDFLAGS += $(LDSTATIC)
endif
ifeq ($(SYSTEM),FreeBSD)
# FreeBSD
CFLAGS += -DFREEBSD
......@@ -82,24 +72,26 @@ LIBS := $(filter-out -lc,$(LIBS))
LIBS += -lfl
endif
ifneq ($(host_cpu),arm)
# Deal with the presence/absence of kerberos in the linux ssl library
ifeq ($(SYSTEM),Linux)
# Linux
NEEDKERB := $(shell nm /usr/lib/libssl.a | grep -q krb; echo $$?)
ifeq ($(NEEDKERB),0)
CFLAGS += `/usr/kerberos/bin/krb5-config --cflags`
LIBS += `/usr/kerberos/bin/krb5-config --libs krb5`
ifneq ($(wildcard /usr/lib/libkrb5support.a),)
LIBS += -lkrb5support
ifneq ($(LDSTATIC),)
NOKERB := $(shell nm /usr/lib/libssl.a | grep -q krb; echo $$?)
else
NOKERB := 1
endif
ifeq ($(NOKERB),0)
CFLAGS += `/usr/kerberos/bin/krb5-config --cflags`
LIBS += `/usr/kerberos/bin/krb5-config --libs krb5`
ifneq ($(wildcard /usr/lib/libkrb5support.a),)
LIBS += -lkrb5support
endif
LIBS += -ldl -lz
endif
endif
ifeq ($(SYSTEM),Linux)
CFLAGS += -DLINUX
YCFLAGS += -I. -I$(TGSRCDIR) -DUSEEVENTS -DLINUX -t
LIBS += -ldl -lz
endif
LEX = flex -l
......@@ -125,7 +117,7 @@ client-install: client
$(INSTALL_PROGRAM) trafgen$(EXE) $(DESTDIR)$(CLIENT_BINDIR)/trafgen$(EXE)
clean:
/bin/rm -f lex.yy.c y.* *.o $(PROGRAMS)
/bin/rm -f lex.yy.c y.* *.o $(PROGRAMS) *-debug
tg2.0:
@echo ""
......
......@@ -11,13 +11,6 @@ SUBDIR = os/dijkstra
include $(OBJDIR)/Makeconf
ifeq ($(NOSTATIC),)
# for now we link everything static
LDSTATIC = -static
else
LDSTATIC =
endif
CXXFLAGS = -Wall -O2 -I/usr/local/include -ftemplate-depth-40 -g
CXXFLAGS += $(LDSTATIC)
......
......@@ -26,13 +26,6 @@ endif
include $(OBJDIR)/Makeconf
ifeq ($(NOSTATIC),)
# for now we link everything static
LDSTATIC = -static
else
LDSTATIC =
endif
all: frisbee frisbeed
include $(TESTBED_SRCDIR)/GNUmakerules
......
......@@ -11,13 +11,6 @@ SUBDIR = os/genhostsfile
include $(OBJDIR)/Makeconf
ifeq ($(NOSTATIC),)
# for now we link everything static
LDSTATIC = -static
else
LDSTATIC =
endif
CFLAGS = -Wall -O2 -g $(LDSTATIC) -I${OBJDIR} -I${TESTBED_SRCDIR}/lib/libtb
LIBS = ${OBJDIR}/lib/libtb/libtb.a
......
......@@ -11,13 +11,6 @@ SUBDIR = os/growdisk
include $(OBJDIR)/Makeconf
ifeq ($(NOSTATIC),)
# for now we link everything static
LDSTATIC = -static
else
LDSTATIC =
endif
all: growdisk
include $(TESTBED_SRCDIR)/GNUmakerules
......
......@@ -60,13 +60,6 @@ WITH_HASH = 1
include $(OBJDIR)/Makeconf
ifeq ($(NOSTATIC),)
# for now we link everything static
LDSTATIC = -static
else
LDSTATIC =
endif
SUBDIRCFLAGS = -Wall -O2 -g # -ansi -pedantic
ifeq ($(SYSTEM),Linux)
SUBDIRCFLAGS += -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_THREAD_SAFE -pthread
......
......@@ -15,17 +15,7 @@ CFLAGS = -Wall -O2 -g \
-I${OBJDIR} -I${TESTBED_SRCDIR}/lib/libtb
LIBS = ${OBJDIR}/lib/libtb/libtb.a
LDFLAGS =
ifeq ($(NOSTATIC),)
# for now we link everything static
LDSTATIC = -static
else
LDSTATIC =
endif
ifneq ($(host_cpu),arm)
LDFLAGS += $(LDSTATIC)
endif
TESTS = $(SRCDIR)/syncd_test.sh
......
......@@ -14,13 +14,6 @@ LBINDIR = $(DESTDIR)/usr/local/bin
include $(OBJDIR)/Makeconf
ifeq ($(NOSTATIC),)
# for now we link everything static
LDSTATIC = -static
else
LDSTATIC =
endif
all:
include $(TESTBED_SRCDIR)/GNUmakerules
......
......@@ -56,7 +56,7 @@ bootinfosend: bootinfosend.o bootinfo.h bootinfo_version.o bootwhat.h $(BI_DBOBJ
$(LFLAGS) -L/usr/local/lib/mysql -lmysqlclient
bootinfoclient: bootinfoclient.o bootinfo.h bootinfo_version.o bootwhat.h
cc -static $(CFLAGS) $(DBFLAG) $(INCS) \
cc $(LDSTATIC) $(CFLAGS) $(DBFLAG) $(INCS) \
-o bootinfoclient bootinfoclient.o bootinfo_version.o
bootinfo_mysql.o: bootinfo.h bootwhat.h
......
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2005 University of Utah and the Flux Group.
# Copyright (c) 2000-2007 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -22,7 +22,8 @@ CFLAGS+= -Wall -g -I${OBJDIR} -I/usr/local/include \
-DCLIENT_BINDIR='"$(CLIENT_BINDIR)"' \
-DLOG_TESTBED=$(LOG_TESTBED) \
-I/usr/local/include
LDFLAGS+= -L${OBJDIR}/lib/libtb -L/usr/local/lib/mysql -L${OBJDIR}/event/lib -static
LDFLAGS+= -L${OBJDIR}/lib/libtb -L/usr/local/lib/mysql -L${OBJDIR}/event/lib
LDFLAGS+= $(LDSTATIC)
LIBS+= -ltb -levent -lcrypto -L/usr/local/lib -lpubsub -lm
CP= cp -pf
......@@ -33,7 +34,7 @@ all: $(CDPROGS) client
include ${TESTBED_SRCDIR}/GNUmakerules
canaryd: canaryd.o childProcess.o networkInterface.o canarydEvents.o auxfuncs.o version.o
$(CC) $(CFLAGS) $(LDFLAGS) -static -o $@ canaryd.o childProcess.o networkInterface.o canarydEvents.o auxfuncs.o version.o $(LIBS) -ldevstat
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ canaryd.o childProcess.o networkInterface.o canarydEvents.o auxfuncs.o version.o $(LIBS) -ldevstat
alertlistener: alertlistener.o
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ alertlistener.o $(LIBS)
......
......@@ -18,20 +18,13 @@ SYSTEM := $(shell uname -s)
include $(OBJDIR)/Makeconf
ifeq ($(NOSTATIC),)
# for now we link everything static
LDSTATIC = -static
else
LDSTATIC =
endif
CC?=gcc
## For debug compilation
##CFLAGS+= -g