Fetching contributors…
Cannot retrieve contributors at this time
125 lines (99 sloc) 3.31 KB
# Makefile.
SHELL = '/bin/sh'
BINDIR = @top_builddir@/bin
LIBDIR = @top_builddir@/lib
CONFDIR = @top_builddir@/conf
DEPLOYDIR = @top_builddir@/deploy
OS_NAME = @OS_NAME@
MESOS_HOME = @prefix@/mesos
WITH_INCLUDED_ZOOKEEPER = @WITH_INCLUDED_ZOOKEEPER@
LIBPROCESS = third_party/libprocess
ZOOKEEPER = third_party/zookeeper-3.3.1/src/c
GLOG = third_party/glog-0.3.1
GTEST = third_party/gtest-1.5.0
default: all
src: third_party
$(MAKE) -C src
third_party:
$(MAKE) -C $(LIBPROCESS)
$(MAKE) -C $(GLOG)
$(MAKE) -C $(GTEST)
ifeq ($(WITH_INCLUDED_ZOOKEEPER),1)
$(MAKE) -C $(ZOOKEEPER)
endif
install:
if test ! -d $(MESOS_HOME)/bin; \
then mkdir -p $(MESOS_HOME)/bin; \
fi
if test ! -d $(MESOS_HOME)/lib; \
then mkdir -p $(MESOS_HOME)/lib; \
fi
if test ! -d $(MESOS_HOME)/lib/java; \
then mkdir -p $(MESOS_HOME)/lib/java; \
fi
if test ! -d $(MESOS_HOME)/lib/python; \
then mkdir -p $(MESOS_HOME)/lib/python; \
fi
if test ! -d $(MESOS_HOME)/conf; \
then mkdir -p $(MESOS_HOME)/conf; \
fi
if test ! -d $(MESOS_HOME)/deploy; \
then mkdir -p $(MESOS_HOME)/deploy; \
fi
install -m 755 $(BINDIR)/mesos-master $(MESOS_HOME)/bin
install -m 755 $(BINDIR)/mesos-slave $(MESOS_HOME)/bin
install -m 755 $(BINDIR)/mesos-local $(MESOS_HOME)/bin
install -m 755 $(BINDIR)/mesos-launcher $(MESOS_HOME)/bin
install -m 755 $(BINDIR)/mesos-getconf $(MESOS_HOME)/bin
rsync -avz $(BINDIR)/webui $(MESOS_HOME)/bin
rsync -avz $(DEPLOYDIR) $(MESOS_HOME)
install -m 755 $(LIBDIR)/libmesos_exec.a $(MESOS_HOME)/lib
install -m 755 $(LIBDIR)/libmesos_sched.a $(MESOS_HOME)/lib
ifeq ($(OS_NAME),darwin)
install -m 755 $(LIBDIR)/libmesos.dylib $(MESOS_HOME)/lib
install -m 755 $(LIBDIR)/java/libmesos.dylib $(MESOS_HOME)/lib/java
else
install -m 755 $(LIBDIR)/libmesos.so $(MESOS_HOME)/lib
install -m 755 $(LIBDIR)/java/libmesos.so $(MESOS_HOME)/lib/java
endif
install -m 755 $(LIBDIR)/java/mesos.jar $(MESOS_HOME)/lib/java
install -m 755 $(LIBDIR)/python/_mesos.so $(MESOS_HOME)/lib/python
install -m 755 $(LIBDIR)/python/mesos.py $(MESOS_HOME)/lib/python
uninstall:
$(error unimplemented)
dist:
$(error unimplemented)
distclean:
$(MAKE) -C src clean
$(MAKE) -C $(LIBPROCESS) distclean
$(MAKE) -C $(GLOG) distclean
$(MAKE) -C $(GTEST) distclean
ifeq ($(WITH_INCLUDED_ZOOKEEPER),1)
$(MAKE) -C $(ZOOKEEPER) distclean
endif
doxygen:
doxygen
etags:
find src -name "*.cpp" -o -name "*.hpp" | grep -v "\~$$" | xargs etags -o src/TAGS
CTAGS = ctags
ctags:
cd src; $(CTAGS) ../include/*.h ../include/*.hpp *.h *.c *.hpp *.cpp
#TODO(*): make the above use conditionals to handle old-school UNIX style ctags too.
#cd src; ctags --typedefs-and-c++ -I -members --declarations ../include/*.h ../include/*.c ../include/*.hpp ../include/*.cpp -o tags
# To use scope from the command line with file generated by csope below (cscope.out),
# run: cscope -R. In vim, you do :chdir MESOS_HOME, then :cscope add cscope.out, see
# also http://cscope.sourceforge.net/cscope_vim_tutorial.html
cscope:
find * -name *.hpp -o -name *.cpp -o -name *.c -o -name *.h | cscope -b -i -
test: all
$(MAKE) -C src test
all: src
clean:
$(MAKE) -C src clean
$(MAKE) -C $(LIBPROCESS) clean
$(MAKE) -C $(GLOG) clean
$(MAKE) -C $(GTEST) clean
ifeq ($(WITH_INCLUDED_ZOOKEEPER),1)
$(MAKE) -C $(ZOOKEEPER) clean
endif
.PHONY: default src third_party install uninstall dist test all clean