Commit f3c93ef1 authored by Leigh Stoller's avatar Leigh Stoller

Checkpoint moving the rest of tmcd client code into the clientside

directory.
parent 9ed83e81
......@@ -20,7 +20,7 @@ ifeq ($(WITH_EMULAB),0)
SUBDIRS += lib
endif
# These must be after lib.
SUBDIRS += event tools os sensors
SUBDIRS += event tools os sensors tmcc
ifeq ($(WITH_EMULAB),1)
all: all-subdirs
......
......@@ -729,6 +729,7 @@ enable_option_checking
with_TBDEFS
with_emulab
enable_elvin_compat
enable_TPM
'
ac_precious_vars='build_alias
host_alias
......@@ -1366,6 +1367,7 @@ Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-elvin_compat[=yes/no] Include Elvin Hash compat [default=no]
--enable-TPM[=yes/no] Include TPM support [default=no]
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
......@@ -4226,6 +4228,22 @@ _ACEOF
fi
# Check whether --enable-TPM was given.
if test "${enable_TPM+set}" = set; then
enableval=$enable_TPM;
fi
if test "$enable_TPM" = "yes"; then
TPM=1
fi
if test $TPM -eq 1; then
cat >>confdefs.h <<_ACEOF
#define TPM 1
_ACEOF
fi
# BEGIN Python detection. For the event library.
for ac_prog in python python2.6 python2.5 python2.4 python2.3 python2.2
do
......@@ -4842,6 +4860,29 @@ outfiles="Makeconf GNUmakefile \
sensors/GNUmakefile \
sensors/slothd/GNUmakefile \
sensors/canaryd/GNUmakefile \
tmcc/GNUmakefile \
tmcc/common/GNUmakefile tmcc/common/config/GNUmakefile \
tmcc/freebsd/GNUmakefile tmcc/freebsd/init/GNUmakefile \
tmcc/freebsd/init/4/GNUmakefile \
tmcc/freebsd/init/5/GNUmakefile \
tmcc/freebsd/init/6/GNUmakefile \
tmcc/freebsd/init/7/GNUmakefile \
tmcc/freebsd/init/8/GNUmakefile \
tmcc/freebsd/supfile tmcc/freebsd/sethostname \
tmcc/linux/GNUmakefile tmcc/linux/supfile \
tmcc/linux/sethostname.dhclient \
tmcc/linux/xen/emulab-cnet \
tmcc/linux9/GNUmakefile tmcc/linux9/supfile \
tmcc/fedora/GNUmakefile tmcc/fedora/supfile \
tmcc/linux-sg/GNUmakefile tmcc/ubuntu7/GNUmakefile \
tmcc/ubuntu10/GNUmakefile \
tmcc/freebsd5/GNUmakefile tmcc/freebsd5/supfile \
tmcc/freebsd6/GNUmakefile tmcc/freebsd6/supfile \
tmcc/freebsd6/netif-emulab tmcc/freebsd7/GNUmakefile \
tmcc/freebsd7/supfile tmcc/freebsd7/netif-emulab \
tmcc/cygwinxp/GNUmakefile tmcc/dp/GNUmakefile \
tmcc/openbsd/GNUmakefile tmcc/ron/GNUmakefile \
tmcc/plab/GNUmakefile \
os/GNUmakefile os/syncd/GNUmakefile \
os/dijkstra/GNUmakefile os/genhostsfile/GNUmakefile"
......
......@@ -180,6 +180,29 @@ outfiles="Makeconf GNUmakefile \
sensors/GNUmakefile \
sensors/slothd/GNUmakefile \
sensors/canaryd/GNUmakefile \
tmcc/GNUmakefile \
tmcc/common/GNUmakefile tmcc/common/config/GNUmakefile \
tmcc/freebsd/GNUmakefile tmcc/freebsd/init/GNUmakefile \
tmcc/freebsd/init/4/GNUmakefile \
tmcc/freebsd/init/5/GNUmakefile \
tmcc/freebsd/init/6/GNUmakefile \
tmcc/freebsd/init/7/GNUmakefile \
tmcc/freebsd/init/8/GNUmakefile \
tmcc/freebsd/supfile tmcc/freebsd/sethostname \
tmcc/linux/GNUmakefile tmcc/linux/supfile \
tmcc/linux/sethostname.dhclient \
tmcc/linux/xen/emulab-cnet \
tmcc/linux9/GNUmakefile tmcc/linux9/supfile \
tmcc/fedora/GNUmakefile tmcc/fedora/supfile \
tmcc/linux-sg/GNUmakefile tmcc/ubuntu7/GNUmakefile \
tmcc/ubuntu10/GNUmakefile \
tmcc/freebsd5/GNUmakefile tmcc/freebsd5/supfile \
tmcc/freebsd6/GNUmakefile tmcc/freebsd6/supfile \
tmcc/freebsd6/netif-emulab tmcc/freebsd7/GNUmakefile \
tmcc/freebsd7/supfile tmcc/freebsd7/netif-emulab \
tmcc/cygwinxp/GNUmakefile tmcc/dp/GNUmakefile \
tmcc/openbsd/GNUmakefile tmcc/ron/GNUmakefile \
tmcc/plab/GNUmakefile \
os/GNUmakefile os/syncd/GNUmakefile \
os/dijkstra/GNUmakefile os/genhostsfile/GNUmakefile"
......
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2011 University of Utah and the Flux Group.
# All rights reserved.
#
SRCDIR = @srcdir@
TESTBED_SRCDIR = @top_srcdir@
OBJDIR = @top_builddir@
SUBDIR = $(subst $(TESTBED_SRCDIR)/,,$(SRCDIR))
SYSTEM := $(shell $(SRCDIR)/osstuff.sh -o)
include $(OBJDIR)/Makeconf
all: fullclient client
fullclient: tmcc
client: tmcc-nossl findif dostype
# For VPATH.
MOSTLY_SRCDIRS = ${TESTBED_SRCDIR}/lib/libtb \
${TESTBED_SRCDIR}/lib/tmcd
include $(TESTBED_SRCDIR)/GNUmakerules
CFLAGS += -O -g -Wall -DUDP \
-I${OBJDIR} -I/usr/local/include \
-I${TESTBED_SRCDIR}/lib/libtb \
-I${TESTBED_SRCDIR}/lib/tmcd \
-L/usr/local/lib
TMLIBS = ${OBJDIR}/lib/tmcd/libtmcc.a ${OBJDIR}/lib/libtb/libtb.a
LDFLAGS += $(LDSTATIC)
#
# For SSL enabled tmcd/tmcc
#
CFLAGS += -DETCDIR='"$(INSTALL_ETCDIR)"'
SSLFLAGS = -DWITHSSL
TMLIBS += -lssl -lcrypto
ifeq ($(SYSTEM),Linux)
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`
TMLIBS += `/usr/kerberos/bin/krb5-config --libs krb5`
ifneq ($(wildcard /usr/lib/libkrb5support.a),)
TMLIBS += -lkrb5support
endif
endif
TMLIBS += -ldl
endif
#
# Take care of historic naming fubars:
# Redhat 7.x -> linux
# Redhat 9.0 -> linux9
# Fedora 4/6 -> fedora
# Stargate 1 -> linux-sg
# FreeBSD 4.x -> freebsd
# Windows XP -> cygwinxp
#
MDSUBDIR := $(shell $(SRCDIR)/osstuff.sh -t)
ifeq ($(SYSTEM),Linux)
ifeq ($(MDSUBDIR),redhat7)
MDSUBDIR = linux
endif
ifeq ($(MDSUBDIR),redhat9)
MDSUBDIR = linux9
endif
ifeq ($(findstring fedora,$(MDSUBDIR)),fedora)
MDSUBDIR = fedora
endif
ifeq ($(findstring centos,$(MDSUBDIR)),centos)
MDSUBDIR = fedora
endif
ifeq ($(MDSUBDIR),stargate1)
MDSUBDIR = linux-sg
endif
endif
ifeq ($(SYSTEM),FreeBSD)
ifeq ($(MDSUBDIR),freebsd4)
MDSUBDIR = freebsd
endif
ifeq ($(MDSUBDIR),freebsd8)
MDSUBDIR = freebsd7
endif
endif
ifeq ($(SYSTEM),Cygwin)
# Cygwin on Windows XP (a.k.a. NT 5.1) - resembles the Linux case.
ifeq ($(MDSUBDIR),CYGWIN_NT-5.1)
MDSUBDIR = cygwinxp
TMSLIBS += -lminires
endif
endif
tmcc: tmcc.c tmcd.h $(TPMLIB)
$(CC) $(CFLAGS) $(SSLFLAGS) $(LDSTATIC) -g -o tmcc \
$< $(LFLAGS) $(TMLIBS)
tmcc-shared: tmcc.c tmcd.h $(TPMLIB)
$(CC) $(CFLAGS) $(SSLFLAGS) -g -o tmcc $< $(LFLAGS) $(TMLIBS)
tmcc-nossl-debug: tmcc.c tmcd.h
$(CC) $(CFLAGS) $(LDSTATIC) -g -o $@ $< $(LFLAGS) $(TMSLIBS)
findif-debug: findif.o
$(CC) $(CFLAGS) -g -o $@ findif.o $(LFLAGS) $(LDSTATIC)
dostype-debug: dostype.o
$(CC) $(CFLAGS) -g -o $@ dostype.o $(LFLAGS)
post-install:
install:
boss-install: $(INSTALL_SBINDIR)/findif \
elabinelabfiles
control-install: tmcc
@$(MAKE) -C freebsd control-install
subboss-install: client
@$(MAKE) -C $(MDSUBDIR) subboss-install
client-install: client
@$(MAKE) -C $(MDSUBDIR) install
mfs: client
mfs-install: mfs
@$(MAKE) -C $(MDSUBDIR) mfs-install
frisbee-mfs: client
frisbee-mfs-install: frisbee-mfs
@$(MAKE) -C $(MDSUBDIR) frisbee-mfs-install
#
# XXX argh! assumes FreeBSD inner boss
#
elabinelabfiles:
$(INSTALL_PROGRAM) $(SRCDIR)/common/config/rc.mkelab \
$(INSTALL_ETCDIR)/rc.mkelab
$(INSTALL_PROGRAM) $(SRCDIR)/freebsd/mkextrafs.pl \
$(INSTALL_ETCDIR)/mkextrafs.pl
#
# Here so that the event system libraries, and libraries they depend upon,
# can get made.
#
${OBJDIR}/lib/tmcd/%:
cd ${OBJDIR}/lib/tmcd && gmake $<
${OBJDIR}/lib/libtb/%:
cd ${OBJDIR}/lib/tbdb && gmake $<
clean: subdir-clean
rm -f *.o core tmcd tmcc tmcc-nossl findif dostype *-debug
subdir-clean:
@$(MAKE) -C $(MDSUBDIR) clean
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2010 University of Utah and the Flux Group.
# Copyright (c) 2000-2011 University of Utah and the Flux Group.
# All rights reserved.
#
#
# XXX ONLY RUN THIS INSTALL ON A TESTBED NODE!
#
......@@ -14,8 +13,8 @@
#
SRCDIR = @srcdir@
TESTBED_SRCDIR = @top_srcdir@
OBJDIR = ../..
SUBDIR = tmcd/common
OBJDIR = @top_builddir@
SUBDIR = $(subst $(TESTBED_SRCDIR)/,,$(SRCDIR))
include $(OBJDIR)/Makeconf
......
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2007 University of Utah and the Flux Group.
# Copyright (c) 2000-2011 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -14,8 +14,8 @@
#
SRCDIR = @srcdir@
TESTBED_SRCDIR = @top_srcdir@
OBJDIR = ../../..
SUBDIR = tmcd/common/config
OBJDIR = @top_builddir@
SUBDIR = $(subst $(TESTBED_SRCDIR)/,,$(SRCDIR))
SCRIPTS = $(addprefix $(SRCDIR)/, \
rc.config rc.misc rc.mounts rc.accounts rc.route \
......
......@@ -6,7 +6,8 @@
#
# XXX ONLY RUN THIS INSTALL ON A CYGWIN / WINDOWS XP NODE!
# Similar to linux9, cygwinxp is an overlay on linux, which is an overlay on common.
# Similar to linux9, cygwinxp is an overlay on linux, which is an overlay
# on common.
#
# Trivial. These things just need to be installed into the right place
# on a testbed node before cutting an image.
......@@ -14,8 +15,8 @@
#
SRCDIR = @srcdir@
TESTBED_SRCDIR = @top_srcdir@
OBJDIR = ../..
SUBDIR = tmcd/cygwinxp
OBJDIR = @top_builddir@
SUBDIR = $(subst $(TESTBED_SRCDIR)/,,$(SRCDIR))
include $(OBJDIR)/Makeconf
......