2 # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
3 # Use is subject to license terms.
4 # Copyright 2015 Igor Kozhukhov <ikozhukhov@gmail.com>
5 # Copyright 2016 Nexenta Systems, Inc. All rights reserved.
6 # Copyright (c) 2019, Joyent, Inc.
7 # Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
10 # Make the SO name unlikely to conflict with any other
11 # libsqlite that might also be found on the system.
12 LIBRARY = libsqlite-sys.a
48 include $(SRC)/lib/Makefile.lib
50 # install this library in the root filesystem
51 include $(SRC)/lib/Makefile.rootfs
55 $(DYNLIB) := LDLIBS += -lc
60 GENSRC = opcodes.c parse.c
68 $(SRCDIR)/btree_rb.c \
86 $(SRCDIR)/tokenize.c \
95 MYCPPFLAGS = -D_REENTRANT -DTHREADSAFE=1 -DHAVE_USLEEP=1 -I. -I.. -I$(SRCDIR)
96 CPPFLAGS += $(MYCPPFLAGS)
98 CERRWARN += -_gcc=-Wno-implicit-function-declaration
99 CERRWARN += $(CNOWARN_UNINIT)
100 CERRWARN += -_gcc=-Wno-unused-function
101 CERRWARN += -_gcc=-Wno-unused-label
106 MAPFILES = $(SRC)/lib/libsqlite/mapfile-sqlite
108 # headers generated here
109 GENHDR = opcodes.h parse.h
111 # Header files used by all library source files.
120 $(SRCDIR)/sqliteInt.h \
125 # Sources used for test harness
128 $(SRCDIR)/tclsqlite.c \
138 TESTOBJS = $(TESTSRC:$(SRCDIR)/%.c=%.o)
140 TESTCLEAN = $(TESTOBJS) test.db test.tcl test1.bt test2.db testdb
145 testfixture := MYCPPFLAGS += -I$(TCLBASE)/include -DTCLSH -DSQLITE_TEST=1
147 testfixture := LDLIBS += -R$(TCLBASE)/lib -L$(TCLBASE)/lib -l$(TCLVERS) -lm -ldl
165 .PARALLEL: $(OBJS) $(PICS)
168 # This is the default Makefile target. The objects listed here
169 # are what get build when you type just "make" with no arguments.
176 $(ROOTLINK): $(ROOTLIBDIR) $(ROOTLIBDIR)/$(DYNLIB)