Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/nccl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Yeager <luke.yeager@gmail.com>2015-12-18 23:00:30 +0300
committerLuke Yeager <luke.yeager@gmail.com>2015-12-18 23:02:17 +0300
commite1634ca6cb5ff26ffd0ba6a7dd5a4ea80f6a400e (patch)
treec38d7215d0252702ee35b2dfa91acb68fbde75ae /Makefile
parent651a6edc5c08b2a32e123219c066292abdcf5819 (diff)
Use semantic versioning
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 8 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index db697ba..2096db2 100644
--- a/Makefile
+++ b/Makefile
@@ -55,7 +55,9 @@ MPIFLAGS := -I$(MPI_HOME)/include -L$(MPI_HOME)/lib -lmpi
INCEXPORTS := nccl.h
LIBSRCFILES := libwrap.cu core.cu all_gather.cu all_reduce.cu broadcast.cu reduce.cu reduce_scatter.cu
LIBNAME := libnccl.so
-APIVER := 0
+VER_MAJOR := 1
+VER_MINOR := 0
+VER_PATCH := 0
TESTS := all_gather_test all_reduce_test broadcast_test reduce_test reduce_scatter_test
MPITESTS := mpi_test
@@ -66,7 +68,8 @@ TSTDIR := $(BUILDDIR)/test
MPITSTDIR := $(BUILDDIR)/mpitest
INCTARGETS := $(patsubst %, $(INCDIR)/%, $(INCEXPORTS))
-LIBTARGET := $(patsubst %, $(LIBDIR)/%.$(APIVER), $(LIBNAME))
+LIBSONAME := $(patsubst %,%.$(VER_MAJOR),$(LIBNAME))
+LIBTARGET := $(patsubst %,%.$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH),$(LIBNAME))
LIBLINK := $(patsubst lib%.so, -l%, $(LIBNAME))
LIBOBJ := $(patsubst %.cu, $(OBJDIR)/%.o, $(filter %.cu, $(LIBSRCFILES)))
TESTBINS := $(patsubst %, $(TSTDIR)/%, $(TESTS))
@@ -80,8 +83,9 @@ lib : $(INCTARGETS) $(LIBTARGET)
$(LIBTARGET) : $(LIBOBJ)
@printf "Linking %-25s\n" $@
@mkdir -p $(LIBDIR)
- @$(GPP) $(CPPFLAGS) $(CXXFLAGS) -shared -Wl,-soname,$(LIBNAME).$(APIVER) -o $@ $(LDFLAGS) $(LIBOBJ)
- @ln -sf $(LIBNAME).$(APIVER) $(LIBDIR)/$(LIBNAME)
+ @$(GPP) $(CPPFLAGS) $(CXXFLAGS) -shared -Wl,-soname,$(LIBSONAME) -o $(LIBDIR)/$@ $(LDFLAGS) $(LIBOBJ)
+ @ln -sf $(LIBSONAME) $(LIBDIR)/$(LIBNAME)
+ @ln -sf $(LIBTARGET) $(LIBDIR)/$(LIBSONAME)
$(INCDIR)/%.h : src/%.h
@printf "Grabbing %-25s > %-25s\n" $< $@