]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Minor makefile tweaks to account for customizations via a custom hand-built makefile.
authorstephan <stephan@noemail.net>
Thu, 24 Oct 2024 12:57:45 +0000 (12:57 +0000)
committerstephan <stephan@noemail.net>
Thu, 24 Oct 2024 12:57:45 +0000 (12:57 +0000)
FossilOrigin-Name: 7f92e820e675ea5d54284c534d44ec4f7f242b30920a5f84c020b93f2e7e969d

Makefile.in
main.mk
manifest
manifest.uuid

index 703511bc94c50fde430f9eca5608adc8890eea83..52396a3e1a512b82a2e00bc9094c1cabc97b11ef 100644 (file)
@@ -93,6 +93,7 @@ includedir ?= @includedir@
 
 INSTALL = @BIN_INSTALL@
 AR = @AR@
+AR.flags = cr # TODO? Add a configure test to determine this?
 CC = @CC@
 B.cc = @BUILD_CC@ @BUILD_CFLAGS@
 T.cc = $(CC)
diff --git a/main.mk b/main.mk
index aca8313f74d2fe60688c4bf01aa70c0f50584a6f..30273ba9d48239dea935492447eb04de7f24a16b 100644 (file)
--- a/main.mk
+++ b/main.mk
@@ -49,9 +49,12 @@ B.cc ?= $(CC)
 T.cc ?= $(B.cc)
 #
 # $(AR) =
-# Tool used to build a static library from object files.
 #
-AR      ?= ar
+# Tool used to build a static library from object files, without its
+# arguments. $(AR.flags) are its flags for creating a lib.
+#
+AR       ?= ar
+AR.flags ?= cr
 #
 # $(B.exe) =
 #
@@ -72,14 +75,14 @@ B.lib ?= .lib
 # File extension for executables on the target platform. ".exe" for
 # Windows and "" everywhere else.
 #
-T.exe ?=
+T.exe ?= $(B.exe)
 #
 # $(T.dll) and $(T.lib) =
 #
 # The DLL resp. static library counterparts of $(T.exe).
 #
-T.dll ?= .so
-T.lib ?= .lib
+T.dll ?= $(B.dll)
+T.lib ?= $(B.lib)
 #
 # $(TCLSH_CMD) =
 #
@@ -110,6 +113,16 @@ JIMSH ?= ./jimsh$(T.exe)
 #
 B.tclsh ?= $(JIMSH)
 
+#
+# Various system-level directories, mostly needed for installation and
+# for finding system-level dependencies.
+#
+prefix       ?= /usr/local
+exec_prefix  ?= $(prefix)
+libdir       ?= $(prefix)/lib
+pkgconfigdir ?= $(libdir)/pkgconfig
+bindir       ?= $(prefix)/bin
+includedir   ?= $(prefix)/include
 #
 # $(LDFLAGS.{feature}) and $(CFLAGS.{feature}) =
 #
@@ -123,21 +136,20 @@ B.tclsh ?= $(JIMSH)
 LDFLAGS.zlib ?= -lz
 LDFLAGS.math ?= -lm
 LDFLAGS.rpath ?= -Wl,-rpath -Wl,$(prefix)/lib
-LDFLAGS.readline ?= -lreadline # these vary wildly across platforms
-CFLAGS.readline ?=
 LDFLAGS.pthread ?= -lpthread
 LDFLAGS.dlopen ?= -ldl
 LDFLAGS.shobj ?= -shared
+LDFLAGS.icu ?= # -licui18n -licuuc -licudata
+# libreadline (or a workalike):
+# To activate readline in the shell: SHELL_OPT = -DHAVE_READLINE
+LDFLAGS.readline ?= -lreadline # these vary wildly across platforms
+CFLAGS.readline ?= -I$(prefix)/include/readline
+# ^^^ When using linenoise instead of readline, do something like:
+# SHELL_OPT += -DHAVE_LINENOISE
+# CFLAGS.readline = $(HOME)/linenoise $(HOME)/linenoise/linenoise.c
+# LDFLAGS.readline = # empty
+
 #
-# Various system-level directories, mostly needed for installation and
-# for finding system-level dependencies.
-#
-prefix       ?= /usr/local
-exec_prefix  ?= $(prefix)
-libdir       ?= $(prefix)/lib
-pkgconfigdir ?= $(libdir)/pkgconfig
-bindir       ?= $(prefix)/bin
-includedir   ?= $(prefix)/include
 #
 # $(INSTALL) =
 #
@@ -1261,7 +1273,7 @@ sqlite3-all.c:    sqlite3.c $(TOP)/tool/split-sqlite3c.tcl $(B.tclsh) # has_tclsh84
 # Static libsqlite3
 #
 $(libsqlite3.LIB): $(LIBOBJ)
-       $(AR) crs $@ $(LIBOBJ)
+       $(AR) $(AR.flags) $@ $(LIBOBJ)
 lib: $(libsqlite3.LIB)
 all: lib
 
@@ -1729,7 +1741,7 @@ sqlite3$(T.exe):  shell.c sqlite3.c $(LIBOBJ)
        $(T.link) -o $@ \
                shell.c $(LIBOBJ) \
                $(CFLAGS.readline) $(SHELL_OPT) \
-               $(LDFLAGS.libsqlite3) $(LDFLAGS.readline)
+               $(LDFLAGS.libsqlite3) $(LDFLAGS.readline) $(LDFLAGS.icu)
 
 #
 # Build sqlite3$(T.exe) by default except in wasi-sdk builds.  Yes, the
index 819c6a9e6bad258ae68fe522ce4f36649373e7ce..d37e48830fbd01aa7d1df9d1c35f10a2b370bcc8 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,9 +1,9 @@
-C Fix\sjimsh0.c\sso\sthat\sit\scompiles\susing\sMSVC:\s\s"cl\sjimsh0.c"
-D 2024-10-24T12:18:53.353
+C Minor\smakefile\stweaks\sto\saccount\sfor\scustomizations\svia\sa\scustom\shand-built\smakefile.
+D 2024-10-24T12:57:45.989
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
-F Makefile.in c9c7aa417b8f012f35ec3e4661f258f7fc415ddd75a55acc7f501a50ec39bb26
+F Makefile.in 9b356be01524cdb771e35f7664e211bcdb397ab55c8d1ff61cf9adb5f80098b8
 F Makefile.linux-generic 8df0e6ee5e4671f844caf27f88d2be7421e904639f7a0ffdce0e2cd4ea11e8c0
 F Makefile.msc 58b69eda1faad5d475092b8aeffab9156ee4901a82db089b166607f2ec907ee4
 F README.md c3c0f19532ce28f6297a71870f3c7b424729f0e6d9ab889616d3587dd2332159
@@ -707,7 +707,7 @@ F ext/wasm/wasmfs.make bc8bb227f35d5bd3863a7bd2233437c37472a0d81585979f058f9b9b5
 F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895 x
 F ltmain.sh 3ff0879076df340d2e23ae905484d8c15d5fdea8
 F magic.txt 5ade0bc977aa135e79e3faaea894d5671b26107cc91e70783aa7dc83f22f3ba0
-F main.mk 35a08d2d0c458205064f8b6ba453c540fcea21d6c389fba8ad8c5a71fb153082
+F main.mk 1b9915be842423224ace56f94ed0134ad1cfaefc28506954ad63cbcacf5ae353
 F mptest/config01.test 3c6adcbc50b991866855f1977ff172eb6d901271
 F mptest/config02.test 4415dfe36c48785f751e16e32c20b077c28ae504
 F mptest/crash01.test 61e61469e257df0850df4293d7d4d6c2af301421
@@ -2236,8 +2236,8 @@ F vsixtest/vsixtest.tcl 6195aba1f12a5e10efc2b8c0009532167be5e301abe5b31385638080
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P bd66222721ad06e99c1b66a3a0fbde06532507aa067165f47fa5d6c41ba630e6
-R ee8b54ba756da77e4f583a1e09246d8d
-U drh
-Z 9fb2435d714bbd037899e6ca13239e09
+P f531825d4e16502ac8fa496fba51ea735232e2988aa9ddd0f232825f6ec2a9a2
+R d9e4cf4cfcffbde09a24ab1ae9a0abb6
+U stephan
+Z a8f41dea3dc5b35a3293ebbb60fab779
 # Remove this line to create a well-formed Fossil manifest.
index eb2b915feca0d6843d55dd86d651fd85464d4a7a..7f7b5d73a2a12987e1e59d55cf8b35422e1473a6 100644 (file)
@@ -1 +1 @@
-f531825d4e16502ac8fa496fba51ea735232e2988aa9ddd0f232825f6ec2a9a2
+7f92e820e675ea5d54284c534d44ec4f7f242b30920a5f84c020b93f2e7e969d