Replace boost::scoped_ptr with std::unique_ptr.
[cumulus.git] / Makefile
index 17a4a24..6332115 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,22 +1,29 @@
 PACKAGES=sqlite3 uuid
-DEBUG=-g #-pg
-CXXFLAGS=-O -Wall -D_FILE_OFFSET_BITS=64 $(DEBUG) \
-        `pkg-config --cflags $(PACKAGES)` -DLBS_VERSION=`cat version`
-LDFLAGS=$(DEBUG) `pkg-config --libs $(PACKAGES)`
+DEBUG=-g
+CXXFLAGS=-O -Wall -Wextra -D_FILE_OFFSET_BITS=64 $(DEBUG) \
+        $(shell pkg-config --cflags $(PACKAGES)) \
+        -DCUMULUS_VERSION=$(shell cat version)
+LDFLAGS=$(DEBUG) $(shell pkg-config --libs $(PACKAGES)) -lpthread
 
-SRCS=localdb.cc metadata.cc ref.cc scandir.cc sha1.cc statcache.cc store.cc \
-     util.cc
+THIRD_PARTY_SRCS=chunk.cc sha1.cc sha256.cc
+SRCS=exclude.cc hash.cc localdb.cc main.cc metadata.cc ref.cc remote.cc \
+     store.cc subfile.cc util.cc $(addprefix third_party/,$(THIRD_PARTY_SRCS))
 OBJS=$(SRCS:.cc=.o)
 
-lbs : $(OBJS)
-       $(CXX) $(LDFLAGS) -o $@ $^
+all : cumulus cumulus-chunker-standalone
+
+cumulus : $(OBJS)
+       $(CXX) -o $@ $^ $(LDFLAGS)
+
+cumulus-chunker-standalone : chunker-standalone.o third_party/chunk.o
+       $(CXX) -o $@ $^ $(LDFLAGS)
 
 version : NEWS
-       (git-describe || (head -n1 NEWS | cut -d" " -f1)) >version 2>/dev/null
+       (git describe || (head -n1 NEWS | cut -d" " -f1)) >version 2>/dev/null
 $(OBJS) : version
 
 clean :
-       rm -f $(OBJS) lbs version
+       rm -f $(OBJS) cumulus version
 
 dep :
        touch Makefile.dep