Add a cache around getpwuid/getgrgid to avoid repeated calls.
[cumulus.git] / Makefile
index de3e9f9..8ae5754 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,22 +1,23 @@
 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))
 
-SRCS=chunk.cc localdb.cc metadata.cc ref.cc remote.cc scandir.cc sha1.cc \
+SRCS=chunk.cc localdb.cc main.cc metadata.cc ref.cc remote.cc sha1.cc \
      store.cc subfile.cc util.cc
 OBJS=$(SRCS:.cc=.o)
 
-lbs : $(OBJS)
-       $(CXX) $(LDFLAGS) -o $@ $^
+cumulus : $(OBJS)
+       $(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