-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
36 lines (22 loc) · 902 Bytes
/
Makefile
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
#!/bin/bash
CPP = g++
CPP_tag = -std=c++11 -O3 -Wno-unknown-pragmas -Wall -fopenmp
MAIN_DIR = ~/github/pserver
INCLUDEPATH = -I/usr/local/include/ -I/usr/include -I$(MAIN_DIR)/ps-lite/src -I$(MAIN_DIR)/ps-lite/deps/include -I$(MAIN_DIR)/ps-lite/include -I./include
LIBRARY = $(MAIN_DIR)/ps-lite/deps/lib/libprotoc.a $(MAIN_DIR)/ps-lite/deps/lib/libprotobuf.a $(MAIN_DIR)/ps-lite/deps/lib/libzmq.a $(MAIN_DIR)/ps-lite/build/libps.a -lz -lpthread
all: ps_lr
ps_lr: main.o lr.o metric.o util.o $(LIBRARY)
$(CPP) $(CPP_tag) -o $@ $^ $(LIBRARY)
mkdir bin
mv ps_lr bin
main.o: src/main.cpp
$(CPP) $(CPP_tag) $(INCLUDEPATH) -c src/main.cpp
lr.o: src/lr.cpp
$(CPP) $(CPP_tag) $(INCLUDEPATH) -c src/lr.cpp
metric.o: src/metric.cpp
$(CPP) $(CPP_tag) $(INCLUDEPATH) -c src/metric.cpp
util.o: src/util.cpp
$(CPP) $(CPP_tag) $(INCLUDEPATH) -c src/util.cpp
clean:
rm -f src/*.o *.o
rm -rf bin