xref: /illumos-gate/usr/src/lib/libsqlite/Makefile (revision 66582b606a8194f7f3ba5b3a3a6dca5b0d346361)
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
30lint	:= TARGET= lint
31
32
33# This is the default Makefile target.  The objects listed here
34# are what get build when you type just "make" with no arguments.
35#
36all install:	sqlite.h $(SUBDIRS)
37clobber lint:	$(SUBDIRS)
38
39$(ROOTHDRDIR):
40	$(INS.dir)
41
42$(ROOTHDRDIR)/%: % $(ROOTHDRDIR)
43	$(INS.file)
44
45install_h:	sqlite.h $(ROOTHDRS)
46
47check:
48
49#
50# we don't want this output different every time, so we just suppress it
51#
52sqlite.h: $(SRCDIR)/sqlite.h.in
53	@echo "Generating $@"; \
54	 sed -e 's"--VERS--"$(SQLITE_VERSION)"' \
55	    -e s/--ENCODING--/$(ENCODING)/ \
56	    $(SRCDIR)/sqlite.h.in > $@
57
58$(SUBDIRS): FRC
59	@cd $@; pwd; $(MAKE) $(TARGET)
60
61FRC:
62
63include $(SRC)/lib/Makefile.targ
64