add make system
This commit is contained in:
parent
88ce76767e
commit
395d5c29d5
@ -6,7 +6,7 @@ MPIBIN = kmeans.mpi
|
|||||||
OBJ = kmeans.o
|
OBJ = kmeans.o
|
||||||
|
|
||||||
# common build script for programs
|
# common build script for programs
|
||||||
include ../common.mk
|
include ../make/common.mk
|
||||||
|
|
||||||
# dependenies here
|
# dependenies here
|
||||||
kmeans.rabit: kmeans.o lib
|
kmeans.rabit: kmeans.o lib
|
||||||
|
|||||||
@ -6,7 +6,7 @@ MPIBIN =
|
|||||||
OBJ = linear.o
|
OBJ = linear.o
|
||||||
|
|
||||||
# common build script for programs
|
# common build script for programs
|
||||||
include ../common.mk
|
include ../make/common.mk
|
||||||
CFLAGS+=-fopenmp
|
CFLAGS+=-fopenmp
|
||||||
linear.o: linear.cc ../../src/*.h linear.h ../solver/*.h
|
linear.o: linear.cc ../../src/*.h linear.h ../solver/*.h
|
||||||
# dependenies here
|
# dependenies here
|
||||||
|
|||||||
@ -1,13 +1,21 @@
|
|||||||
# this is the common build script for rabit programs
|
# this is the common build script for rabit programs
|
||||||
# you do not have to use it
|
# you do not have to use it
|
||||||
export CC = gcc
|
|
||||||
export CXX = g++
|
|
||||||
export MPICXX = mpicxx
|
|
||||||
export LDFLAGS= -pthread -lm -L../../lib -lrt
|
export LDFLAGS= -pthread -lm -L../../lib -lrt
|
||||||
export CFLAGS = -Wall -msse2 -Wno-unknown-pragmas -fPIC -I../../include
|
export CFLAGS = -Wall -msse2 -Wno-unknown-pragmas -fPIC -I../../include
|
||||||
|
|
||||||
|
# setup opencv
|
||||||
|
ifeq ($(USE_HDFS),1)
|
||||||
|
CFLAGS+= -DRABIT_USE_HDFS=1 -I$(HDFS_HOME)/include
|
||||||
|
LDFLAGS+= -L$(HDFS_HOME)/lib/native -lhdfs
|
||||||
|
else
|
||||||
|
CFLAGS+= -DRABIT_USE_HDFS=0
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
.PHONY: clean all lib mpi
|
.PHONY: clean all lib mpi
|
||||||
|
|
||||||
all: $(BIN) $(MOCKBIN)
|
all: $(BIN) $(MOCKBIN)
|
||||||
|
|
||||||
mpi: $(MPIBIN)
|
mpi: $(MPIBIN)
|
||||||
|
|
||||||
lib:
|
lib:
|
||||||
@ -15,6 +23,7 @@ lib:
|
|||||||
libmpi:
|
libmpi:
|
||||||
cd ../..;make lib/librabit_mpi.a;cd -
|
cd ../..;make lib/librabit_mpi.a;cd -
|
||||||
|
|
||||||
|
|
||||||
$(BIN) :
|
$(BIN) :
|
||||||
$(CXX) $(CFLAGS) -o $@ $(filter %.cpp %.o %.c %.cc, $^) -lrabit $(LDFLAGS)
|
$(CXX) $(CFLAGS) -o $@ $(filter %.cpp %.o %.c %.cc, $^) -lrabit $(LDFLAGS)
|
||||||
|
|
||||||
21
rabit-learn/make/config.mk
Normal file
21
rabit-learn/make/config.mk
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#-----------------------------------------------------
|
||||||
|
# rabit-learn: the configuration compile script
|
||||||
|
#
|
||||||
|
# This is the default configuration setup for rabit-learn
|
||||||
|
# If you want to change configuration, do the following steps:
|
||||||
|
#
|
||||||
|
# - copy this file to the root of rabit-learn folder
|
||||||
|
# - modify the configuration you want
|
||||||
|
# - type make or make -j n for parallel build
|
||||||
|
#----------------------------------------------------
|
||||||
|
|
||||||
|
# choice of compiler
|
||||||
|
export CC = gcc
|
||||||
|
export CXX = g++
|
||||||
|
export MPICXX = mpicxx
|
||||||
|
|
||||||
|
# whether use HDFS support during compile
|
||||||
|
USE_HDFS = 1
|
||||||
|
|
||||||
|
# home of hadoop
|
||||||
|
HDFS_HOME = $(HADOOP_HDFS_HOME)
|
||||||
Loading…
x
Reference in New Issue
Block a user