-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.in
143 lines (117 loc) · 4.92 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Makefile.
SHELL = '/bin/sh'
BUILDSRC = @top_builddir@/src
BINDIR = @top_builddir@/bin
LIBDIR = @top_builddir@/lib
CONFDIR = @top_builddir@/conf
DEPLOYDIR = @top_builddir@/deploy
OS_NAME = @OS_NAME@
PYTHON = @PYTHON@
MESOS_INSTALL_HOME = $(DESTDIR)@prefix@/mesos
WITH_INCLUDED_ZOOKEEPER = @WITH_INCLUDED_ZOOKEEPER@
LIBPROCESS = third_party/libprocess
PROTOBUF = third_party/protobuf-2.3.0
GLOG = third_party/glog-0.3.1
ZOOKEEPER = third_party/zookeeper-3.3.1/src/c
LEVELDB = third_party/leveldb
SETUPTOOLS = @SETUPTOOLS@
export VERSION = `git describe --tags | cut -f 2,3,4 -d - | sed "s/-/\./"`
default: all
src: third_party
$(MAKE) -C src
third_party: setuptools
$(MAKE) -C $(LIBPROCESS)
$(MAKE) -C $(PROTOBUF)
$(MAKE) -C $(GLOG)
ifneq (@top_srcdir@,@top_builddir@)
mkdir -p @top_builddir@/$(LEVELDB)
cp -r @top_srcdir@/$(LEVELDB) @top_builddir@/`dirname $(LEVELDB)`
endif
$(MAKE) -C $(LEVELDB)
ifeq ($(WITH_INCLUDED_ZOOKEEPER),1)
$(MAKE) -C $(ZOOKEEPER)
endif
setuptools:
ifneq (@top_srcdir@,@top_builddir@)
mkdir -p @top_builddir@/`dirname $(SETUPTOOLS)`
cp -f @top_srcdir@/$(SETUPTOOLS) @top_builddir@/$(SETUPTOOLS)
endif
# TODO(benh): Install generated C++ header files.
install:
install -d $(MESOS_INSTALL_HOME)/bin $(MESOS_INSTALL_HOME)/lib/java
install -d $(MESOS_INSTALL_HOME)/conf $(MESOS_INSTALL_HOME)/deploy
install -m 755 $(BINDIR)/mesos-master $(MESOS_INSTALL_HOME)/bin
install -m 755 $(BINDIR)/mesos-slave $(MESOS_INSTALL_HOME)/bin
install -m 755 $(BINDIR)/mesos-local $(MESOS_INSTALL_HOME)/bin
install -m 755 $(BINDIR)/mesos-launcher $(MESOS_INSTALL_HOME)/bin
install -m 755 $(BINDIR)/mesos-getconf $(MESOS_INSTALL_HOME)/bin
install -m 755 $(BINDIR)/killtree.sh $(MESOS_INSTALL_HOME)/bin
cd $(BINDIR)/webui && find . | cpio -pdmu $(MESOS_INSTALL_HOME)/bin/webui
install -m 755 $(LIBDIR)/libmesos_exec.a $(MESOS_INSTALL_HOME)/lib
install -m 755 $(LIBDIR)/libmesos_sched.a $(MESOS_INSTALL_HOME)/lib
ifeq ($(OS_NAME),darwin)
install -m 755 $(LIBDIR)/libmesos.dylib $(MESOS_INSTALL_HOME)/lib
install -m 755 $(LIBDIR)/java/libmesos.dylib $(MESOS_INSTALL_HOME)/lib/java
else
install -m 755 $(LIBDIR)/libmesos.so $(MESOS_INSTALL_HOME)/lib
install -m 755 $(LIBDIR)/java/libmesos.so $(MESOS_INSTALL_HOME)/lib/java
endif
install -m 755 $(LIBDIR)/java/mesos.jar $(MESOS_INSTALL_HOME)/lib/java
install -d $(MESOS_INSTALL_HOME)/lib/python
PYTHONPATH=$(SETUPTOOLS):$(MESOS_INSTALL_HOME)/lib/python $(PYTHON) -m easy_install --install-dir $(MESOS_INSTALL_HOME)/lib/python -a $(BUILDSRC)/python/dist/*.egg
PYTHONPATH=$(SETUPTOOLS):$(MESOS_INSTALL_HOME)/lib/python $(PYTHON) -m easy_install --install-dir $(MESOS_INSTALL_HOME)/lib/python -a @top_builddir@/$(PROTOBUF)/python/dist/*.egg
uninstall:
$(error unimplemented)
maven-install:
mvn install:install-file -Dfile=$(LIBDIR)/java/mesos.jar -Dsources=$(LIBDIR)/java/mesos-sources.jar -DpomFile=$(LIBDIR)/java/mesos.pom
dist:
$(error unimplemented)
distclean:
$(MAKE) -C src clean # TODO(benh): Support an internal distclean.
$(MAKE) -C $(LIBPROCESS) distclean
$(MAKE) -C $(PROTOBUF) distclean
$(MAKE) -C $(GLOG) 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 $(PROTOBUF) clean
$(MAKE) -C $(GLOG) clean
ifeq ($(WITH_INCLUDED_ZOOKEEPER),1)
$(MAKE) -C $(ZOOKEEPER) clean
endif
.PHONY: default src third_party install uninstall dist test all clean