From 146549321044615d9aef2b30cedccda9c49f3f38 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Mon, 9 Nov 2009 16:12:28 -0800 Subject: [PATCH] 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. --- Makefile | 28 ++++++++++---------- database-private.h => lib/database-private.h | 0 database.cc => lib/database.cc | 0 index.cc => lib/index.cc | 0 libsha1.c => lib/libsha1.c | 0 libsha1.h => lib/libsha1.h | 0 message-file.c => lib/message-file.c | 0 message.cc => lib/message.cc | 0 notmuch-private.h => lib/notmuch-private.h | 0 notmuch.h => lib/notmuch.h | 0 query.cc => lib/query.cc | 0 sha1.c => lib/sha1.c | 0 tags.c => lib/tags.c | 0 thread.cc => lib/thread.cc | 0 xutil.c => lib/xutil.c | 0 xutil.h => lib/xutil.h | 0 16 files changed, 14 insertions(+), 14 deletions(-) rename database-private.h => lib/database-private.h (100%) rename database.cc => lib/database.cc (100%) rename index.cc => lib/index.cc (100%) rename libsha1.c => lib/libsha1.c (100%) rename libsha1.h => lib/libsha1.h (100%) rename message-file.c => lib/message-file.c (100%) rename message.cc => lib/message.cc (100%) rename notmuch-private.h => lib/notmuch-private.h (100%) rename notmuch.h => lib/notmuch.h (100%) rename query.cc => lib/query.cc (100%) rename sha1.c => lib/sha1.c (100%) rename tags.c => lib/tags.c (100%) rename thread.cc => lib/thread.cc (100%) rename xutil.c => lib/xutil.c (100%) rename xutil.h => lib/xutil.h (100%) 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 -- 2.26.2