1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
From: Sean Whitton <spwhitton@spwhitton.name>
Date: Thu, 11 Jun 2020 18:17:54 -0700
Subject: compile against system libsqlite3 and use Debian CFLAGS
---
sqlite/Makefile | 8 ++++----
sqlite/emacsql.c | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/sqlite/Makefile b/sqlite/Makefile
index a505528..4f79cb9 100644
--- a/sqlite/Makefile
+++ b/sqlite/Makefile
@@ -1,6 +1,6 @@
.POSIX:
-LDLIBS = -ldl -lm
-CFLAGS = -O2 -Wall -Wextra \
+LDLIBS = -lsqlite3
+CFLAGS += \
-DSQLITE_THREADSAFE=0 \
-DSQLITE_DEFAULT_FOREIGN_KEYS=1 \
-DSQLITE_ENABLE_FTS5 \
@@ -10,8 +10,8 @@ CFLAGS = -O2 -Wall -Wextra \
-DSQLITE_ENABLE_JSON1 \
-DSQLITE_SOUNDEX
-emacsql-sqlite: emacsql.c sqlite3.c
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ emacsql.c sqlite3.c $(LDLIBS)
+emacsql-sqlite: emacsql.c
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ emacsql.c $(LDLIBS)
clean:
rm -f emacsql-sqlite
diff --git a/sqlite/emacsql.c b/sqlite/emacsql.c
index 884c4d2..0a54bab 100644
--- a/sqlite/emacsql.c
+++ b/sqlite/emacsql.c
@@ -1,7 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "sqlite3.h"
+#include <sqlite3.h>
#define TRUE 1
#define FALSE 0
|