-PROGS=g_mime_test
+PROGS=g_mime_test xapian-dump
+
+MYCFLAGS=-Wall
+MYCXXFLAGS=-Wall
all: $(PROGS)
g_mime_test: g_mime_test.c
- $(CC) g_mime_test.c `pkg-config --cflags --libs gmime-2.4` -o g_mime_test
+ $(CC) $(CFLAGS) $(MYCFLAGS) g_mime_test.c `pkg-config --cflags --libs gmime-2.4` -o g_mime_test
+
+xapian-dump: xapian-dump.cc
+ $(CXX) $(CXXFLAGS) $(MYCXXFLAGS) xapian-dump.cc `xapian-config --libs --cxxflags` -o xapian-dump
clean:
rm -f $(PROGS)
--- /dev/null
+/*
+ * Copyright © 2009 Carl Worth
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/ .
+ *
+ * Author: Carl Worth <cworth@cworth.org>
+ */
+
+#include <cstdlib>
+
+#include <xapian.h>
+
+int
+main (int argc, char *argv[])
+{
+ if (argc < 2) {
+ fprintf (stderr, "Usage: %s <path-to-xapian-database>\n",
+ argv[0]);
+ exit (1);
+ }
+
+ return 0;
+}