forked from dmlc/rabit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
26 lines (20 loc) · 774 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
export CC = gcc
export CXX = g++
export MPICXX = mpicxx
export LDFLAGS= -pthread -lm -L../lib
export CFLAGS = -Wall -O3 -msse2 -std=c++11 -Wno-unknown-pragmas -fPIC -fopenmp -I../include
.PHONY: clean all lib libmpi
BIN = basic.rabit broadcast.rabit
MOCKBIN= lazy_allreduce.mock
all: $(BIN)
basic.rabit: basic.cc lib ../lib/librabit.a
broadcast.rabit: broadcast.cc lib ../lib/librabit.a
lazy_allreduce.mock: lazy_allreduce.cc lib ../lib/librabit.a
$(BIN) :
$(CXX) $(CFLAGS) -o $@ $(filter %.cpp %.o %.c %.cc %.a, $^) $(LDFLAGS)
$(MOCKBIN) :
$(CXX) $(CFLAGS) -std=c++11 -o $@ $(filter %.cpp %.o %.c %.cc, $^) $(LDFLAGS) -lrabit_mock
$(OBJ) :
$(CXX) -c $(CFLAGS) -o $@ $(firstword $(filter %.cpp %.c %.cc, $^) )
clean:
$(RM) $(OBJ) $(BIN) $(MOCKBIN) *~ ../src/*~