Port to new build system, and adjust things to give the same output. * 0030-fix-prefix-and-install-dir.patch: fixups for the new build system * 0031-use-packaged-lempar.c.patch: patch from debian for the same thing we did * 0002-sqlite3.32.3-Makefile.in-fix-rule-compiling-rbu.exe.patch: adjusted for the new build system All other patches should no longer be needed. Drop extensions that don't build for now.
56 lines
1.6 KiB
Makefile
56 lines
1.6 KiB
Makefile
# PLEASE KEEP IN SYNC WITH CORRESPONDING FILE IN MINGW64-SQLITE.
|
|
#
|
|
# Makefile template to generate sqlite extensions
|
|
# in sub-folder ext/misc of sqlite-src-xxxxx package.
|
|
|
|
DLL_PREFIX = msys-sqlite3
|
|
DLL_SUFFIX = -0
|
|
extdir = $(prefix)/bin
|
|
|
|
srcdir = @srcdir@
|
|
top_srcdir = @top_srcdir@
|
|
top_builddir = @top_builddir@
|
|
|
|
vpath %.c $(srcdir)
|
|
vpath %.in ../$(top_srcdir)
|
|
|
|
prefix = @prefix@
|
|
datadir = @datadir@
|
|
docdir = $(datadir)/sqlite/extensions
|
|
|
|
# c-source for each of which an extension is built
|
|
CSRCS = $(filter-out $(addprefix $(srcdir)/,$(CSRCS_IGNORE)),$(wildcard $(srcdir)/*.c))
|
|
# c-sources not to compile as standalone sqlite-extensions
|
|
CSRCS_IGNORE = memtrace.c json1.c pcachetrace.c vfstrace.c
|
|
# c-source already compiled into sqlite3 client
|
|
CSRCS_IGNORE += regexp.c
|
|
# c-source to be ignored because of compilation errors
|
|
#CSRCS_IGNORE +=
|
|
|
|
DLLS = $(patsubst %.c,$(DLL_PREFIX)%$(DLL_SUFFIX).dll,$(notdir $(CSRCS)))
|
|
|
|
CC = @CC@
|
|
CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)/src
|
|
CFLAGS = -pedantic
|
|
LIBS = -Wl,--no-undefined -L$(top_builddir) -lsqlite3 -lz
|
|
|
|
.PHONY : all
|
|
all : $(DLLS)
|
|
|
|
$(DLL_PREFIX)%$(DLL_SUFFIX).dll: %.c
|
|
$(CC) -shared $(CPPFLAGS) $(CFLAGS) -o $@ $< $(LIBS)
|
|
|
|
|
|
.PHONY: clean install install-dlls install-c-files
|
|
clean:
|
|
-rm -f $(DLLS) 2> /dev/nul
|
|
|
|
install: install-dlls install-c-files
|
|
|
|
install-dlls: $(DLLS)
|
|
mkdir -p $(DESTDIR)$(extdir)
|
|
cp -vp $^ $(DESTDIR)$(extdir)
|
|
|
|
install-c-files: $(CSRCS)
|
|
mkdir -p $(DESTDIR)$(docdir)
|
|
cp -vp $^ $(DESTDIR)$(docdir)
|