libify: Move library sources down into lib directory.
authorCarl Worth <cworth@cworth.org>
Tue, 10 Nov 2009 00:12:28 +0000 (16:12 -0800)
committerCarl Worth <cworth@cworth.org>
Tue, 10 Nov 2009 00:24:03 +0000 (16:24 -0800)
A "make" invocation still works from the top-level, but not from
down inside the lib directory yet.

16 files changed:
Makefile
lib/database-private.h [moved from database-private.h with 100% similarity]
lib/database.cc [moved from database.cc with 100% similarity]
lib/index.cc [moved from index.cc with 100% similarity]
lib/libsha1.c [moved from libsha1.c with 100% similarity]
lib/libsha1.h [moved from libsha1.h with 100% similarity]
lib/message-file.c [moved from message-file.c with 100% similarity]
lib/message.cc [moved from message.cc with 100% similarity]
lib/notmuch-private.h [moved from notmuch-private.h with 100% similarity]
lib/notmuch.h [moved from notmuch.h with 100% similarity]
lib/query.cc [moved from query.cc with 100% similarity]
lib/sha1.c [moved from sha1.c with 100% similarity]
lib/tags.c [moved from tags.c with 100% similarity]
lib/thread.cc [moved from thread.cc with 100% similarity]
lib/xutil.c [moved from xutil.c with 100% similarity]
lib/xutil.h [moved from xutil.h with 100% similarity]

index 280b5566bb25e36239b280fbccba881c8e9c3fea..1e7f5f2c88a4e6d902573bf4cacc6d13caf03491 100644 (file)
--- 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
similarity index 100%
rename from database-private.h
rename to lib/database-private.h
similarity index 100%
rename from database.cc
rename to lib/database.cc
similarity index 100%
rename from index.cc
rename to lib/index.cc
similarity index 100%
rename from libsha1.c
rename to lib/libsha1.c
similarity index 100%
rename from libsha1.h
rename to lib/libsha1.h
similarity index 100%
rename from message-file.c
rename to lib/message-file.c
similarity index 100%
rename from message.cc
rename to lib/message.cc
similarity index 100%
rename from notmuch-private.h
rename to lib/notmuch-private.h
similarity index 100%
rename from notmuch.h
rename to lib/notmuch.h
similarity index 100%
rename from query.cc
rename to lib/query.cc
similarity index 100%
rename from sha1.c
rename to lib/sha1.c
similarity index 100%
rename from tags.c
rename to lib/tags.c
similarity index 100%
rename from thread.cc
rename to lib/thread.cc
similarity index 100%
rename from xutil.c
rename to lib/xutil.c
similarity index 100%
rename from xutil.h
rename to lib/xutil.h