xref: /illumos-gate/usr/src/lib/libsqlite/Makefile (revision e214b19eaa16fec1fa60a97227778103f598336f)
1#
2# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
3# Use is subject to license terms.
4#
5
6SUBDIRS	=	$(MACH)
7
8SQLITE_VERSION = 2.8.15-repcached
9
10VERS = .1
11
12include $(SRC)/lib/Makefile.lib
13
14ENCODING  = ISO8859
15
16SRCDIR=	src
17
18HDRS=           sqlite.h sqlite-misc.h
19ROOTHDRDIR=     $(ROOT)/usr/include/sqlite-sys
20ROOTHDRS=       $(HDRS:%=$(ROOTHDRDIR)/%)
21CHECKHDRS=      $(HDRS:%.h=%.check)
22CLOBBERFILES +=	sqlite.h
23
24.KEEP_STATE:
25
26all	:= TARGET= all
27clean	:= TARGET= clean
28clobber	:= TARGET= clobber
29install	:= TARGET= install
30
31
32# This is the default Makefile target.  The objects listed here
33# are what get build when you type just "make" with no arguments.
34#
35all install:	sqlite.h $(SUBDIRS)
36clobber:	$(SUBDIRS)
37
38$(ROOTHDRDIR):
39	$(INS.dir)
40
41$(ROOTHDRDIR)/%: % $(ROOTHDRDIR)
42	$(INS.file)
43
44install_h:	sqlite.h $(ROOTHDRS)
45
46check:
47
48#
49# we don't want this output different every time, so we just suppress it
50#
51sqlite.h: $(SRCDIR)/sqlite.h.in
52	@echo "Generating $@"; \
53	 sed -e 's"--VERS--"$(SQLITE_VERSION)"' \
54	    -e s/--ENCODING--/$(ENCODING)/ \
55	    $(SRCDIR)/sqlite.h.in > $@
56
57$(SUBDIRS): FRC
58	@cd $@; pwd; $(MAKE) $(TARGET)
59
60FRC:
61
62include $(SRC)/lib/Makefile.targ
63