1c5c4113dSnw# 2c5c4113dSnw# CDDL HEADER START 3c5c4113dSnw# 4c5c4113dSnw# The contents of this file are subject to the terms of the 5c5c4113dSnw# Common Development and Distribution License (the "License"). 6c5c4113dSnw# You may not use this file except in compliance with the License. 7c5c4113dSnw# 8c5c4113dSnw# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9c5c4113dSnw# or http://www.opensolaris.org/os/licensing. 10c5c4113dSnw# See the License for the specific language governing permissions 11c5c4113dSnw# and limitations under the License. 12c5c4113dSnw# 13c5c4113dSnw# When distributing Covered Code, include this CDDL HEADER in each 14c5c4113dSnw# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15c5c4113dSnw# If applicable, add the following below this CDDL HEADER, with the 16c5c4113dSnw# fields enclosed by brackets "[]" replaced with your own identifying 17c5c4113dSnw# information: Portions Copyright [yyyy] [name of copyright owner] 18c5c4113dSnw# 19c5c4113dSnw# CDDL HEADER END 20c5c4113dSnw# 21c5c4113dSnw# 22c5c4113dSnw# Copyright 2007 Sun Microsystems, Inc. All rights reserved. 23c5c4113dSnw# Use is subject to license terms. 24c5c4113dSnw# 255661bb76SJohn Levon# Copyright (c) 2018, Joyent, Inc. 26c5c4113dSnw 27c5c4113dSnwPROG= sqlite 28c5c4113dSnw 29c5c4113dSnwinclude ../Makefile.cmd 30c5c4113dSnw 31c5c4113dSnwinclude $(SRC)/lib/Makefile.lib 32c5c4113dSnw 3391d7f85eSGordon RossSQLITEHDRDIR= $(ROOTHDRDIR)/sqlite-sys 34c5c4113dSnw 35c5c4113dSnwROOTLIBSVCBIN= $(ROOT)/lib/svc/bin 36c5c4113dSnwROOTSQLITE= $(PROG:%=$(ROOTLIBSVCBIN)/%) 37c5c4113dSnw 38c5c4113dSnwOBJS= shell.o 39c5c4113dSnw$(OBJS) := CFLAGS += $(CTF_FLAGS) 40c5c4113dSnw$(OBJS) := CTFCONVERT_POST = $(CTFCONVERT_O) 41c5c4113dSnw 427014882cSRichard LoweCERRWARN += -_gcc=-Wno-empty-body 437014882cSRichard Lowe 445661bb76SJohn Levon# not linted 455661bb76SJohn LevonSMATCH=off 465661bb76SJohn Levon 4791d7f85eSGordon RossLDLIBS += -lsqlite-sys 4891d7f85eSGordon Ross 49c5c4113dSnw.KEEP_STATE: 50c5c4113dSnw 51c5c4113dSnw$(ROOTSQLITE) := FILEMODE= 555 52c5c4113dSnw 53c5c4113dSnw$(ROOTLIBSVCBIN)/%: % 54c5c4113dSnw $(INS.file) 55c5c4113dSnw 56c5c4113dSnwCPPFLAGS += -D_REENTRANT -DTHREADSAFE=1 -DHAVE_USLEEP=1 \ 57c5c4113dSnw -I$(SQLITEHDRDIR) 58c5c4113dSnw 59c5c4113dSnw$(PROG): $(OBJS) $(SQLITEHDRDIR)/sqlite.h 60c5c4113dSnw $(LINK.c) -o $@ $(OBJS) \ 61*85f4cb87SRichard Lowe $(MAPFILE.NES:%=-Wl,-M%) $(MAPFILE.NED:%=-Wl,-M%) $(LDLIBS) 6291d7f85eSGordon Ross $(CTFMERGE) -t -L VERSION -o $@ $(OBJS) 63c5c4113dSnw $(POST_PROCESS) 64c5c4113dSnw 65*85f4cb87SRichard Loweall: $(PROG) 66c5c4113dSnw 67c5c4113dSnwinstall: all $(ROOTSQLITE) 68c5c4113dSnw 69c5c4113dSnwclean: 70c5c4113dSnw $(RM) $(OBJS) 71c5c4113dSnw 72c5c4113dSnwinclude ../Makefile.targ 73