X-Git-Url: http://git.vrable.net/?a=blobdiff_plain;f=Makefile;h=3602ea793bc1f71b0d20b2a3f5ee50936a1ac953;hb=78376bd08b8f19a73fde4a1d922c743bd0a9dfbf;hp=1822adc7bd27e32b5b6a7595ef5dda08086c2533;hpb=948051f02c9bc3285ce1ea187dbae27120dbf7aa;p=cumulus.git diff --git a/Makefile b/Makefile index 1822adc..3602ea7 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 sha1.o store.o +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) -scandir : $(OBJS) +cumulus : $(OBJS) $(CXX) $(LDFLAGS) -o $@ $^ + +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