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