Skip to content

Commit

Permalink
Make --enable-build-sqlite work more smoothly
Browse files Browse the repository at this point in the history
Signed-off-by: Cole Miller <[email protected]>
  • Loading branch information
cole-miller committed Mar 11, 2024
1 parent 2eadfe4 commit 0adc6b9
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ AM_CFLAGS += $(CODE_COVERAGE_CFLAGS)
AM_CFLAGS += $(SQLITE_CFLAGS) $(UV_CFLAGS) $(PTHREAD_CFLAGS)
AM_LDFLAGS = $(UV_LIBS) $(PTHREAD_LIBS)

if !BUILD_SQLITE_ENABLED
AM_LDFLAGS += $(SQLITE_LIBS)
endif

if !BUILD_RAFT_ENABLED
AM_CFLAGS += $(RAFT_CFLAGS)
AM_LDFLAGS += $(RAFT_LIBS)
Expand Down Expand Up @@ -63,10 +59,6 @@ basic_dqlite_sources = \
src/tuple.c \
src/vfs.c

if BUILD_SQLITE_ENABLED
basic_dqlite_sources += sqlite3.c
endif

lib_LTLIBRARIES = libdqlite.la
libdqlite_la_CFLAGS = $(AM_CFLAGS) -fvisibility=hidden -DRAFT_API=''
libdqlite_la_LDFLAGS = $(AM_LDFLAGS) -version-info 0:1:0
Expand Down Expand Up @@ -331,6 +323,17 @@ endif

endif # BUILD_RAFT_ENABLED

if BUILD_SQLITE_ENABLED
noinst_LTLIBRARIES = libsqlite3.la
libsqlite3_la_SOURCES = sqlite3.c
libsqlite3_la_CFLAGS = -g3

unit_test_LDADD += libsqlite3.la
libdqlite_la_LIBADD = libsqlite3.la
else
AM_LDFLAGS += $(SQLITE_LIBS)
endif

TESTS = $(check_PROGRAMS)

if CODE_COVERAGE_ENABLED
Expand Down

0 comments on commit 0adc6b9

Please sign in to comment.