Add make variable to select os-provided sqlite3 library

doc_update_sequoia
Damiano Boppart 6 years ago
parent 440e3bbbf4
commit 9603f39bfd

@ -55,6 +55,10 @@ ETPAN_LIB=-L$(PREFIX)/lib
# libetpan include search flag
ETPAN_INC=-I$(PREFIX)/include
######### sqlite3 #########
# If empty (or undefined), compile sqlite3 from the sources shipped with the pEp distribution. Otherwise, use an sqlite3 implementation found in the OS's include/library paths.
SQLITE3_FROM_OS=placeholder
######### OpenPGP #########
# Path of GPG binary
GPG_CMD=gpg

@ -8,6 +8,7 @@ include ../Makefile.conf
CFLAGS+= $(ETPAN_INC) -I../asn.1 -DSYSTEM_DB=\"$(SYSTEM_DB)\" $(EXTRA_MACROS)
LDFLAGS+= $(ETPAN_LIB) -L../asn.1 -shared
LDLIBS+= -lc -letpan -lasn1
NO_SOURCE=
ifeq ($(BUILD_ON),Darwin)
ifeq ($(BUILD_FOR),Darwin)
@ -28,13 +29,18 @@ else
$(error I don't know how to make for $(BUILD_FOR) on $(BUILD_ON))
endif
ifdef SQLITE3_FROM_OS
NO_SOURCE+= sqlite3.c
CFLAGS+= -DSQLITE3_FROM_OS
endif
ifeq ($(OPENPGP),GPG)
NO_SOURCE=pgp_netpgp.c
NO_SOURCE+= pgp_netpgp.c
CFLAGS+= -DUSE_GPG $(GPGME_INC) -DLIBGPGME=\"$(LIBGPGME)\"
LDFLAGS+= $(GPGME_LIB)
# No extra LDLIBS are needed here, because GPGME is dynamically loaded
else ifeq ($(OPENPGP),NETPGP)
NO_SOURCE=pgp_gpg.c
NO_SOURCE+= pgp_gpg.c
CFLAGS+= -DUSE_NETPGP $(NETGPG_INC)
LDFLAGS+= $(NETGPG_LIB)
LDLIBS+= -lnetpgp -lcurl
@ -42,7 +48,7 @@ else
$(error Unknown OpenPGP library: $(OPENPGP))
endif
ALL_SOURCE=$(subst $(NO_SOURCE),,$(wildcard *.c))
ALL_SOURCE=$(filter-out $(NO_SOURCE),$(wildcard *.c))
DEPENDS=$(subst .c,.d,$(ALL_SOURCE))
ALL_OBJECTS=$(subst .c,.o,$(ALL_SOURCE))

@ -56,7 +56,11 @@
#include <stdio.h>
#include <ctype.h>
#ifdef SQLITE3_FROM_OS
#include <sqlite3.h>
#else
#include "sqlite3.h"
#endif
#define _EXPORT_PEP_ENGINE_DLL
#include "pEpEngine.h"

Loading…
Cancel
Save