Makefile cleanups.
[cumulus.git] / Makefile
index f29d2a7..ee00c7d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,18 +1,26 @@
-PACKAGES=uuid
+PACKAGES=sqlite3 uuid
 DEBUG=-g #-pg
 CXXFLAGS=-O -Wall -D_FILE_OFFSET_BITS=64 $(DEBUG) \
-        `pkg-config --cflags $(PACKAGES)`
+        `pkg-config --cflags $(PACKAGES)` -DLBS_VERSION=`cat version`
 LDFLAGS=$(DEBUG) -ltar `pkg-config --libs $(PACKAGES)`
 
-SRCS=format.cc ref.cc scandir.cc sha1.cc store.cc
+SRCS=localdb.cc ref.cc scandir.cc sha1.cc statcache.cc store.cc util.cc
 OBJS=$(SRCS:.cc=.o)
 
-scandir : $(OBJS)
+lbs : $(OBJS)
        $(CXX) $(LDFLAGS) -o $@ $^
 
-dep:
+version :
+       (git-describe || echo "Unknown") >version
+$(OBJS) : version
+
+clean :
+       rm -f $(OBJS) lbs version
+
+dep :
        touch Makefile.dep
        makedepend -fMakefile.dep $(SRCS)
 
--include *.dep
+.PHONY : clean dep
 
+-include *.dep