xref: /titanic_51/usr/src/cmd/sqlite/Makefile (revision 7014882c6a3672fd0e5d60200af8643ae53c5928)
1c5c4113dSnw141292#
2c5c4113dSnw141292# CDDL HEADER START
3c5c4113dSnw141292#
4c5c4113dSnw141292# The contents of this file are subject to the terms of the
5c5c4113dSnw141292# Common Development and Distribution License (the "License").
6c5c4113dSnw141292# You may not use this file except in compliance with the License.
7c5c4113dSnw141292#
8c5c4113dSnw141292# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9c5c4113dSnw141292# or http://www.opensolaris.org/os/licensing.
10c5c4113dSnw141292# See the License for the specific language governing permissions
11c5c4113dSnw141292# and limitations under the License.
12c5c4113dSnw141292#
13c5c4113dSnw141292# When distributing Covered Code, include this CDDL HEADER in each
14c5c4113dSnw141292# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15c5c4113dSnw141292# If applicable, add the following below this CDDL HEADER, with the
16c5c4113dSnw141292# fields enclosed by brackets "[]" replaced with your own identifying
17c5c4113dSnw141292# information: Portions Copyright [yyyy] [name of copyright owner]
18c5c4113dSnw141292#
19c5c4113dSnw141292# CDDL HEADER END
20c5c4113dSnw141292#
21c5c4113dSnw141292#
22c5c4113dSnw141292# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23c5c4113dSnw141292# Use is subject to license terms.
24c5c4113dSnw141292#
25c5c4113dSnw141292
26c5c4113dSnw141292PROG=		sqlite
27c5c4113dSnw141292
28c5c4113dSnw141292include ../Makefile.cmd
29c5c4113dSnw141292
30c5c4113dSnw141292include $(SRC)/lib/Makefile.lib
31c5c4113dSnw141292
32c5c4113dSnw141292SQLITEHDRDIR=	$(ROOTHDRDIR)/sqlite
33c5c4113dSnw141292LIBSQLITE=	$(ROOTLIBDIR)/libsqlite.o
34c5c4113dSnw141292
35c5c4113dSnw141292ROOTLIBSVCBIN=	$(ROOT)/lib/svc/bin
36c5c4113dSnw141292ROOTSQLITE=	$(PROG:%=$(ROOTLIBSVCBIN)/%)
37c5c4113dSnw141292
38c5c4113dSnw141292OBJS=		shell.o
39c5c4113dSnw141292$(OBJS) :=	CFLAGS += $(CTF_FLAGS)
40c5c4113dSnw141292$(OBJS) :=	CTFCONVERT_POST = $(CTFCONVERT_O)
41c5c4113dSnw141292
42*7014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-empty-body
43*7014882cSRichard Lowe
44c5c4113dSnw141292.KEEP_STATE:
45c5c4113dSnw141292
46c5c4113dSnw141292$(ROOTSQLITE)	:= FILEMODE= 555
47c5c4113dSnw141292
48c5c4113dSnw141292$(ROOTLIBSVCBIN)/%: %
49c5c4113dSnw141292	$(INS.file)
50c5c4113dSnw141292
51c5c4113dSnw141292CPPFLAGS +=	-D_REENTRANT -DTHREADSAFE=1 -DHAVE_USLEEP=1 \
52c5c4113dSnw141292		-I$(SQLITEHDRDIR)
53c5c4113dSnw141292
54c5c4113dSnw141292$(PROG): $(OBJS) $(SQLITEHDRDIR)/sqlite.h
55c5c4113dSnw141292	$(LINK.c) -o $@ $(OBJS) \
56c5c4113dSnw141292	    $(MAPFILE.NES:%=-M%) $(MAPFILE.NED:%=-M%) $(LIBSQLITE)
57c5c4113dSnw141292	$(CTFMERGE) -t -L VERSION -o $@ $(OBJS) $(LIBSQLITE)
58c5c4113dSnw141292	$(POST_PROCESS)
59c5c4113dSnw141292
60c5c4113dSnw141292all: $(PROG)
61c5c4113dSnw141292
62c5c4113dSnw141292install: all $(ROOTSQLITE)
63c5c4113dSnw141292
64c5c4113dSnw141292clean:
65c5c4113dSnw141292	$(RM) $(OBJS)
66c5c4113dSnw141292
67c5c4113dSnw141292lint:
68c5c4113dSnw141292
69c5c4113dSnw141292include ../Makefile.targ
70