16570 tools svccfg could be built more normally (fix libscf)
[illumos-gate.git] / usr / src / lib / libsqlite / Makefile.com
blobce6074fe96e445718b1ffcf89252e659dae62517
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
14 VERS = .2.8.15
15 OBJECTS = \
16         attach.o        \
17         auth.o          \
18         btree.o         \
19         btree_rb.o      \
20         build.o         \
21         copy.o          \
22         date.o          \
23         delete.o        \
24         encode.o        \
25         expr.o          \
26         func.o          \
27         hash.o          \
28         insert.o        \
29         main.o          \
30         opcodes.o       \
31         os.o            \
32         pager.o         \
33         parse.o         \
34         pragma.o        \
35         printf.o        \
36         random.o        \
37         select.o        \
38         table.o         \
39         tokenize.o      \
40         trigger.o       \
41         update.o        \
42         util.o          \
43         vacuum.o        \
44         vdbe.o          \
45         vdbeaux.o       \
46         where.o
48 include $(SRC)/lib/Makefile.lib
50 # install this library in the root filesystem
51 include $(SRC)/lib/Makefile.rootfs
53 SRCDIR = ../src
54 TOOLDIR = ../tool
55 $(DYNLIB) := LDLIBS += -lc
57 LIBS = $(DYNLIB)
59 # generated sources
60 GENSRC = opcodes.c parse.c
62 # all sources
63 SRCS = \
64         $(GENSRC) \
65         $(SRCDIR)/attach.c      \
66         $(SRCDIR)/auth.c        \
67         $(SRCDIR)/btree.c       \
68         $(SRCDIR)/btree_rb.c    \
69         $(SRCDIR)/build.c       \
70         $(SRCDIR)/copy.c        \
71         $(SRCDIR)/date.c        \
72         $(SRCDIR)/delete.c      \
73         $(SRCDIR)/encode.c      \
74         $(SRCDIR)/expr.c        \
75         $(SRCDIR)/func.c        \
76         $(SRCDIR)/hash.c        \
77         $(SRCDIR)/insert.c      \
78         $(SRCDIR)/main.c        \
79         $(SRCDIR)/os.c          \
80         $(SRCDIR)/pager.c       \
81         $(SRCDIR)/pragma.c      \
82         $(SRCDIR)/printf.c      \
83         $(SRCDIR)/random.c      \
84         $(SRCDIR)/select.c      \
85         $(SRCDIR)/table.c       \
86         $(SRCDIR)/tokenize.c    \
87         $(SRCDIR)/update.c      \
88         $(SRCDIR)/util.c        \
89         $(SRCDIR)/vacuum.c      \
90         $(SRCDIR)/vdbe.c        \
91         $(SRCDIR)/vdbeaux.c     \
92         $(SRCDIR)/where.c       \
93         $(SRCDIR)/trigger.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
103 # not linted
104 SMATCH=off
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.
113 HDR = \
114         $(GENHDR) \
115         $(SRCDIR)/btree.h       \
116         $(SRCDIR)/config.h      \
117         $(SRCDIR)/hash.h        \
118         $(SRCDIR)/os.h          \
119         ../sqlite.h             \
120         $(SRCDIR)/sqliteInt.h   \
121         $(SRCDIR)/vdbe.h        \
122         $(SRCDIR)/vdbeInt.h
125 # Sources used for test harness
127 TESTSRC = \
128         $(SRCDIR)/tclsqlite.c   \
129         $(SRCDIR)/btree.c       \
130         $(SRCDIR)/func.c        \
131         $(SRCDIR)/os.c          \
132         $(SRCDIR)/pager.c       \
133         $(SRCDIR)/test1.c       \
134         $(SRCDIR)/test2.c       \
135         $(SRCDIR)/test3.c       \
136         $(SRCDIR)/md5.c
138 TESTOBJS = $(TESTSRC:$(SRCDIR)/%.c=%.o)
140 TESTCLEAN = $(TESTOBJS) test.db test.tcl test1.bt test2.db testdb
142 TCLBASE = /usr/sfw
143 TCLVERS = tcl8.3
145 testfixture := MYCPPFLAGS += -I$(TCLBASE)/include -DTCLSH -DSQLITE_TEST=1
147 testfixture := LDLIBS += -R$(TCLBASE)/lib -L$(TCLBASE)/lib -l$(TCLVERS) -lm -ldl
149 CLEANFILES += \
150         $(TESTCLEAN)    \
151         lemon           \
152         lemon.o         \
153         lempar.c        \
154         opcodes.c       \
155         opcodes.h       \
156         parse_tmp.c     \
157         parse_tmp.h     \
158         parse_tmp.out   \
159         parse_tmp.y     \
160         parse.c         \
161         parse.h
163 ENCODING  = ISO8859
165 .PARALLEL: $(OBJS) $(PICS)
166 .KEEP_STATE:
168 # This is the default Makefile target.  The objects listed here
169 # are what get build when you type just "make" with no arguments.
171 all:            $(LIBS)
172 install:        all
174 all_h: $(GENHDR)
176 $(ROOTLINK): $(ROOTLIBDIR) $(ROOTLIBDIR)/$(DYNLIB)
177         $(INS.liblink)