@@ -26,7 +26,11 @@ AM_CFLAGS = -I$(top_srcdir)/src
2626
2727AM_CFLAGS += -std=c99 -DSQLITE_THREADSAFE=1 -DSQLITE_DQS=0 -DSQLITE_MAX_ATTACHED=10 -DSQLITE_SOUNDEX=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_SECURE_DELETE=1 -DSQLITE_ENABLE_DESERIALIZE=1 -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_FTS3_PARENTHESIS=1 -DSQLITE_ENABLE_FTS4=1 -DSQLITE_ENABLE_FTS5=1 -DSQLITE_ENABLE_JSON1=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_GEOPOLY=1 -DSQLITE_ENABLE_PREUPDATE_HOOK=1 -DSQLITE_ENABLE_SESSION=1 -DSQLITE_CORE=1 -DSQLITE_ENABLE_EXTFUNC=1 -DSQLITE_ENABLE_MATH_FUNCTIONS=1 -DSQLITE_ENABLE_CSV=1 -DSQLITE_ENABLE_SHA3=1 -DSQLITE_ENABLE_CARRAY=1 -DSQLITE_ENABLE_FILEIO=1 -DSQLITE_ENABLE_SERIES=1 -DSQLITE_ENABLE_UUID=1 -DSQLITE_ENABLE_REGEXP=1 -DSQLITE_TEMP_STORE=2 -DSQLITE_USE_URI=1 -DSQLITE_USER_AUTHENTICATION=1 $(X86_FLAGS ) $(ARM_FLAGS )
2828
29+ if USE_MSW
30+ AM_LDFLAGS =
31+ else
2932AM_LDFLAGS = -pthread -ldl -lm
33+ endif
3034
3135if HAVE_ZLIB
3236AM_CFLAGS += -DSQLITE_HAVE_ZLIB=1
6771lib@SQLITE3MC_LIBNAME@_la_SOURCES = \
6872 src/sqlite3mc.c
6973
74+ if USE_MSW
75+ lib@SQLITE3MC_LIBNAME@_la_SOURCES += \
76+ src/sqlite3mc.rc
77+ endif
78+
7079includemc_HEADERS = \
7180 src/sqlite3.h \
7281 src/sqlite3userauth.h \
@@ -114,7 +123,11 @@ noinst_HEADERS = \
114123 src/test_windirent.h
115124
116125lib@SQLITE3MC_LIBNAME@_la_LDFLAGS = -no-undefined $(AM_LDFLAGS )
126+ if USE_MSW
127+ lib@SQLITE3MC_LIBNAME@_la_LIBADD = src/sqlite3mc.res_o
128+ else
117129lib@SQLITE3MC_LIBNAME@_la_LIBADD = -ldl -lm
130+ endif
118131
119132
120133# Samples (don't need to be installed).
@@ -126,18 +139,23 @@ sqlite3shell_SOURCES = \
126139
127140sqlite3shell_CFLAGS = -I$(top_srcdir ) /src -std=c99 -D_GNU_SOURCE -DSQLITE_THREADSAFE=1 -DSQLITE_DQS=0 -DSQLITE_MAX_ATTACHED=10 -DSQLITE_SOUNDEX=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_SECURE_DELETE=1 -DSQLITE_ENABLE_DESERIALIZE=1 -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_FTS3_PARENTHESIS=1 -DSQLITE_ENABLE_FTS4=1 -DSQLITE_ENABLE_FTS5=1 -DSQLITE_ENABLE_JSON1=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_GEOPOLY=1 -DSQLITE_ENABLE_PREUPDATE_HOOK=1 -DSQLITE_ENABLE_SESSION=1 -DSQLITE_CORE=1 -DSQLITE_ENABLE_EXTFUNC=1 -DSQLITE_ENABLE_MATH_FUNCTIONS=1 -DSQLITE_ENABLE_CSV=1 -DSQLITE_ENABLE_CARRAY=1 -DSQLITE_ENABLE_UUID=1 -DSQLITE_TEMP_STORE=2 -DSQLITE_USE_URI=1 -DSQLITE_USER_AUTHENTICATION=1 -DSQLITE_ENABLE_DBPAGE_VTAB=1 -DSQLITE_ENABLE_DBSTAT_VTAB=1 -DSQLITE_ENABLE_STMTVTAB=1 -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION=1 $(X86_FLAGS ) $(ARM_FLAGS )
128141
142+ if USE_MSW
143+ sqlite3shell_LDADD =
144+ sqlite3shell_LDFLAGS =
145+ else
129146sqlite3shell_LDADD = -ldl -lm
130147sqlite3shell_LDFLAGS = -pthread
148+ endif
131149
132150if HAVE_ZLIB
133151sqlite3shell_CFLAGS += -DSQLITE_HAVE_ZLIB=1
134152sqlite3shell_LDADD += -lz
135153endif
136154
137155if USE_MSW
138- sqlite3shell_SOURCES += src/sqlite3shell .rc
139- sqlite3shell_LDADD += src/sqlite3shell .res_o
140- CLEANFILES = src/sqlite3shell .res_o
156+ sqlite3shell_SOURCES += src/sqlite3mc_shell .rc
157+ sqlite3shell_LDADD += src/sqlite3mc_shell .res_o
158+ CLEANFILES = src/sqlite3mc_shell .res_o
141159else
142160# libtool complains about unknown "-no-install" option when targetting MSW, so
143161# use it only in the "else" branch.
0 commit comments