X-Git-Url: http://git.vrable.net/?a=blobdiff_plain;f=Makefile;h=162d9f98f6b26f8ec6fa15e50754045487123d22;hb=fc223ec17dc5e6691291a7b31f6daa8679b484cd;hp=45fb135aea34c438052c243788182acd6e5e270b;hpb=38c66f088ed65d2f42264c92add6e0b33eac2bfc;p=cumulus.git diff --git a/Makefile b/Makefile index 45fb135..162d9f9 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,28 @@ -CXXFLAGS=-O -Wall -D_FILE_OFFSET_BITS=64 -g -LDFLAGS=-g +PACKAGES=sqlite3 uuid +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)) -OBJS=scandir.o store.o +SRCS=chunk.cc exclude.cc localdb.cc main.cc metadata.cc ref.cc remote.cc \ + sha1.cc store.cc subfile.cc util.cc +OBJS=$(SRCS:.cc=.o) -scandir : $(OBJS) - $(CXX) $(LDFLAGS) -o $@ $^ +cumulus : $(OBJS) + $(CXX) -o $@ $^ $(LDFLAGS) + +version : NEWS + (git describe || (head -n1 NEWS | cut -d" " -f1)) >version 2>/dev/null +$(OBJS) : version + +clean : + rm -f $(OBJS) cumulus version + +dep : + touch Makefile.dep + makedepend -fMakefile.dep $(SRCS) + +.PHONY : clean dep + +-include *.dep