forked from apache/singa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.am
127 lines (113 loc) · 4.04 KB
/
Makefile.am
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
CLOCAL_AMFLAGS = -I config
AUTOMAKE_OPTIONS = foreign subdir-objects
AM_CPPFLAGS = -I$(top_srcdir)/src
MSHADOW_FLAGS = -DMSHADOW_USE_CUDA=0 -DMSHADOW_USE_CBLAS=1 -DMSHADOW_USE_MKL=0
AC_CXXFLAGS = -O3 -Wall -pthread -fPIC -std=c++11 -Wno-unknown-pragmas \
$(MSHADOW_FLAGS) -DCPU_ONLY=1 -funroll-loops
INCLUDES=-I$(top_srcdir)/include
PROTOS := $(top_srcdir)/src/proto/cluster.proto $(top_srcdir)/src/proto/model.proto
PROTO_SRCS := src/proto/cluster.pb.cc src/proto/model.pb.cc
PROTO_HDRS := src/proto/cluster.pb.h src/proto/model.pb.h
PROTO_OBJS := src/proto/cluster.pb.o src/proto/model.pb.o
SINGA_SRCS := src/utils/cluster.cc \
src/utils/cluster_rt.cc \
src/utils/graph.cc \
src/utils/common.cc \
src/utils/param.cc \
src/utils/updater.cc \
src/utils/data_shard.cc \
src/utils/blob.cc \
src/trainer/server.cc \
src/trainer/worker.cc \
src/trainer/trainer.cc \
src/neuralnet/base_layer.cc \
src/neuralnet/neuralnet.cc \
src/neuralnet/layer.cc \
src/communication/socket.cc \
src/communication/msg.cc
SINGA_HDRS := include/utils/cluster.h \
include/utils/cluster_rt.h \
include/utils/param.h \
include/utils/common.h \
include/utils/factory.h \
include/utils/data_shard.h \
include/utils/singleton.h \
include/utils/graph.h \
include/utils/blob.h \
include/utils/updater.h \
include/trainer/server.h \
include/trainer/worker.h \
include/trainer/trainer.h \
include/neuralnet/base_layer.h \
include/neuralnet/layer.h \
include/neuralnet/neuralnet.h \
include/mshadow/tensor_expr.h \
include/mshadow/tensor_container.h \
include/mshadow/tensor_expr_ext.h \
include/mshadow/tensor.h \
include/mshadow/tensor_io.h \
include/mshadow/cxxnet_op.h \
include/mshadow/tensor_base.h \
include/mshadow/tensor_random.h \
include/communication/msg.h \
include/communication/socket.h
SINGA_OBJS := src/proto/cluster.pb.o \
src/proto/model.pb.o \
src/utils/cluster.o \
src/utils/cluster_rt.o \
src/utils/graph.o \
src/utils/common.o \
src/utils/param.o \
src/utils/updater.o \
src/utils/data_shard.o \
src/utils/blob.o \
src/trainer/server.o \
src/trainer/worker.o \
src/trainer/pm_server.o \
src/trainer/trainer.o \
src/trainer/pm_worker.o \
src/neuralnet/base_layer.o \
src/neuralnet/neuralnet.o \
src/neuralnet/layer.o \
src/communication/socket.o \
src/communication/msg.o
lib_LTLIBRARIES = libsinga.la
libsinga_la_SOURCES = $(PROTO_HDRS) $(PROTO_SRCS) $(SINGA_SRCS) $(SINGA_HDRS)
libsinga_la_CXXFLAGS = -O3 -Wall -pthread -fPIC -std=c++11 -Wno-unknown-pragmas \
$(MSHADOW_FLAGS) -DCPU_ONLY=1 -funroll-loops -gdwarf-2 -gstrict-dwarf -Woverloaded-virtual -DTHREADED -fpermissive
libsinga_la_LDFLAGS = -I./include
lib_LTLIBRARIES += libsingashard.la
libsingashard_la_SOURCES = src/utils/data_shard.cc \
src/proto/model.pb.cc \
src/utils/common.cc \
include/proto/model.pb.h \
include/utils/common.h \
include/utils/data_shard.h
libsingashard_la_CXXFLAGS = -O3 -Wall -pthread -fPIC -std=c++11 -Wno-unknown-pragmas \
$(MSHADOW_FLAGS) -DCPU_ONLY=1 -funroll-loops -gdwarf-2 -gstrict-dwarf -Woverloaded-virtual
libsingashard_la_LDFLAGS = -I./include
bin_PROGRAMS=singa
singa_SOURCES=src/main.cc
singa_CXXFLAGS = -O3 -Wall -pthread -fPIC -std=c++11 -MMD -Wno-unknown-pragmas \
$(MSHADOW_FLAGS) -DCPU_ONLY=1 -funroll-loops -DTHREADED -fpermissive
singa_LDFLAGS = -I./include \
-lsinga \
-lglog \
-lgflags \
-lprotobuf \
-lrt \
-lopencv_highgui \
-lopencv_imgproc \
-lopencv_core \
-lopenblas \
-lzmq \
-lczmq \
-llmdb \
-lzookeeper_mt
clean-local:
rm -rf $(PROTO_SRCS) $(PROTO_HDRS)
$(PROTO_HDRS) $(PROTO_SRCS): $(PROTOS)
protoc --proto_path=$(top_srcdir)/src/proto --cpp_out=$(top_srcdir)/src/proto $(PROTOS)
mkdir -p $(top_srcdir)/include/proto/
cp $(top_srcdir)/src/proto/*.pb.h $(top_srcdir)/include/proto/
@echo