From: Carl Worth Date: Tue, 10 Nov 2009 00:12:28 +0000 (-0800) Subject: libify: Move library sources down into lib directory. X-Git-Tag: 0.1~552 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=146549321044615d9aef2b30cedccda9c49f3f38;p=notmuch.git libify: Move library sources down into lib directory. A "make" invocation still works from the top-level, but not from down inside the lib directory yet. --- diff --git a/Makefile b/Makefile index 280b5566..1e7f5f2c 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ PROGS=notmuch WARN_FLAGS=-Wall -Wextra -Wmissing-declarations -Wwrite-strings -Wswitch-enum -NOTMUCH_DEPENDS_FLAGS=`pkg-config --cflags glib-2.0 gmime-2.4 talloc` +NOTMUCH_DEPENDS_FLAGS=-I./lib `pkg-config --cflags glib-2.0 gmime-2.4 talloc` NOTMUCH_CXX_DEPENDS_FLAGS=$(NOTMUCH_DEPENDS_FLAGS) `xapian-config --cxxflags` NOTMUCH_CFLAGS=$(WARN_FLAGS) -O0 -g $(NOTMUCH_DEPENDS_FLAGS) @@ -11,17 +11,17 @@ NOTMUCH_CXXFLAGS=$(WARN_FLAGS) -O0 -g $(NOTMUCH_CXX_DEPENDS_FLAGS) NOTMUCH_LDFLAGS=`pkg-config --libs glib-2.0 gmime-2.4 talloc` \ `xapian-config --libs` -LIBRARY= \ - database.o \ - index.o \ - libsha1.o \ - message.o \ - message-file.o \ - query.o \ - sha1.o \ - tags.o \ - thread.o \ - xutil.o +LIBRARY= \ + lib/database.o \ + lib/index.o \ + lib/libsha1.o \ + lib/message.o \ + lib/message-file.o \ + lib/query.o \ + lib/sha1.o \ + lib/tags.o \ + lib/thread.o \ + lib/xutil.o MAIN= \ notmuch.o @@ -37,7 +37,7 @@ all: $(PROGS) notmuch: $(MAIN) $(LIBRARY) $(CC) $(NOTMUCH_LDFLAGS) $^ -o $@ -Makefile.dep: *.c *.cc +Makefile.dep: *.c lib/*.c lib/*.cc $(CXX) -M $(CPPFLAGS) $(NOTMUCH_DEPENDS_FLAGS) \ $(NOTMUCH_CXX_DEPENDS_FLAGS) $^ > $@ -include Makefile.dep @@ -52,4 +52,4 @@ install: all notmuch.1.gz $(DESTDIR)/etc/bash_completion.d/notmuch clean: - rm -f $(PROGS) *.o Makefile.dep + rm -f $(PROGS) lib/*.o *.o Makefile.dep diff --git a/database-private.h b/lib/database-private.h similarity index 100% rename from database-private.h rename to lib/database-private.h diff --git a/database.cc b/lib/database.cc similarity index 100% rename from database.cc rename to lib/database.cc diff --git a/index.cc b/lib/index.cc similarity index 100% rename from index.cc rename to lib/index.cc diff --git a/libsha1.c b/lib/libsha1.c similarity index 100% rename from libsha1.c rename to lib/libsha1.c diff --git a/libsha1.h b/lib/libsha1.h similarity index 100% rename from libsha1.h rename to lib/libsha1.h diff --git a/message-file.c b/lib/message-file.c similarity index 100% rename from message-file.c rename to lib/message-file.c diff --git a/message.cc b/lib/message.cc similarity index 100% rename from message.cc rename to lib/message.cc diff --git a/notmuch-private.h b/lib/notmuch-private.h similarity index 100% rename from notmuch-private.h rename to lib/notmuch-private.h diff --git a/notmuch.h b/lib/notmuch.h similarity index 100% rename from notmuch.h rename to lib/notmuch.h diff --git a/query.cc b/lib/query.cc similarity index 100% rename from query.cc rename to lib/query.cc diff --git a/sha1.c b/lib/sha1.c similarity index 100% rename from sha1.c rename to lib/sha1.c diff --git a/tags.c b/lib/tags.c similarity index 100% rename from tags.c rename to lib/tags.c diff --git a/thread.cc b/lib/thread.cc similarity index 100% rename from thread.cc rename to lib/thread.cc diff --git a/xutil.c b/lib/xutil.c similarity index 100% rename from xutil.c rename to lib/xutil.c diff --git a/xutil.h b/lib/xutil.h similarity index 100% rename from xutil.h rename to lib/xutil.h