xref: /illumos-gate/usr/src/tools/svc/libsqlite/Makefile (revision 33efde4275d24731ef87927237b0ffb0630b6b2d)
1#
2# This file and its contents are supplied under the terms of the
3# Common Development and Distribution License ("CDDL"), version 1.0.
4# You may only use this file in accordance with the terms of version
5# 1.0 of the CDDL.
6#
7# A full copy of the text of the CDDL should have accompanied this
8# source.  A copy of the CDDL is also available via the Internet at
9# http://www.illumos.org/license/CDDL.
10#
11
12# Copyright 2023 Richard Lowe
13
14include $(SRC)/lib/libsqlite/Makefile.com
15include $(SRC)/tools/Makefile.tools
16
17SRCDIR = $(SRC)/lib/libsqlite/src
18TOOLDIR = $(SRC)/lib/libsqlite/tool
19
20SQLITE_VERSION = 2.8.15-repcached
21ENCODING  = ISO8859
22
23NATIVE_LIBS += libc.so
24
25CPPFLAGS += $(MYCPPFLAGS)
26
27CERRWARN += -_gcc=-Wno-implicit-function-declaration
28CERRWARN += $(CNOWARN_UNINIT)
29CERRWARN += -_gcc=-Wno-unused-function
30
31LIBLINKS = libsqlite-sys.so
32
33.KEEP_STATE:
34
35$(PICS): sqlite.h
36
37sqlite.h: $(SRCDIR)/sqlite.h.in
38	@echo "Generating $@"; \
39	 sed -e 's"--VERS--"$(SQLITE_VERSION)"' \
40	    -e s/--ENCODING--/$(ENCODING)/ \
41	    $(SRCDIR)/sqlite.h.in > $@
42
43install: all $(ROOTONBLDLIBMACH)/$(DYNLIB) $(ROOTONBLDLIBMACH)/$(LIBLINKS)
44
45$(ROOTONBLDLIBMACH)/$(DYNLIB): $(DYNLIB)
46	$(INS.file) $(DYNLIB)
47
48$(ROOTONBLDLIBMACH)/$(LIBLINKS): $(ROOTONBLDLIBMACH)/$(DYNLIB)
49		@$(RM) $(ROOTONBLDLIBMACH)/$(LIBLINKS)
50		$(SYMLINK) $(DYNLIB) $(ROOTONBLDLIBMACH)/$(LIBLINKS)
51
52
53include $(SRC)/lib/libsqlite/Makefile.targ
54