1*7c478bd9Sstevel@tonic-gate# 2*7c478bd9Sstevel@tonic-gate# CDDL HEADER START 3*7c478bd9Sstevel@tonic-gate# 4*7c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 5*7c478bd9Sstevel@tonic-gate# Common Development and Distribution License, Version 1.0 only 6*7c478bd9Sstevel@tonic-gate# (the "License"). You may not use this file except in compliance 7*7c478bd9Sstevel@tonic-gate# with the License. 8*7c478bd9Sstevel@tonic-gate# 9*7c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*7c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 11*7c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 12*7c478bd9Sstevel@tonic-gate# and limitations under the License. 13*7c478bd9Sstevel@tonic-gate# 14*7c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 15*7c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*7c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 17*7c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 18*7c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 19*7c478bd9Sstevel@tonic-gate# 20*7c478bd9Sstevel@tonic-gate# CDDL HEADER END 21*7c478bd9Sstevel@tonic-gate# 22*7c478bd9Sstevel@tonic-gate# 23*7c478bd9Sstevel@tonic-gate# Copyright 2005 Sun Microsystems, Inc. All rights reserved. 24*7c478bd9Sstevel@tonic-gate# Use is subject to license terms. 25*7c478bd9Sstevel@tonic-gate# 26*7c478bd9Sstevel@tonic-gate# ident "%Z%%M% %I% %E% SMI" 27*7c478bd9Sstevel@tonic-gate# 28*7c478bd9Sstevel@tonic-gate 29*7c478bd9Sstevel@tonic-gateMYPROG = svc.configd 30*7c478bd9Sstevel@tonic-gateMYOBJS = \ 31*7c478bd9Sstevel@tonic-gate backend.o \ 32*7c478bd9Sstevel@tonic-gate configd.o \ 33*7c478bd9Sstevel@tonic-gate client.o \ 34*7c478bd9Sstevel@tonic-gate file_object.o \ 35*7c478bd9Sstevel@tonic-gate maindoor.o \ 36*7c478bd9Sstevel@tonic-gate object.o \ 37*7c478bd9Sstevel@tonic-gate rc_node.o \ 38*7c478bd9Sstevel@tonic-gate snapshot.o 39*7c478bd9Sstevel@tonic-gate 40*7c478bd9Sstevel@tonic-gatePROG = $(MYPROG) 41*7c478bd9Sstevel@tonic-gateOBJS = $(MYOBJS) 42*7c478bd9Sstevel@tonic-gate 43*7c478bd9Sstevel@tonic-gateSRCS = $(MYOBJS:%.o=%.c) 44*7c478bd9Sstevel@tonic-gate 45*7c478bd9Sstevel@tonic-gateinclude ../../Makefile.cmd 46*7c478bd9Sstevel@tonic-gateinclude ../Makefile.ctf 47*7c478bd9Sstevel@tonic-gate 48*7c478bd9Sstevel@tonic-gateNATIVE_BUILD=$(POUND_SIGN) 49*7c478bd9Sstevel@tonic-gate$(NATIVE_BUILD)PROG = $(MYPROG:%=%-native) 50*7c478bd9Sstevel@tonic-gate$(NATIVE_BUILD)OBJS = $(MYOBJS:%.o=%-native.o) 51*7c478bd9Sstevel@tonic-gate 52*7c478bd9Sstevel@tonic-gateROOTCMDDIR= $(ROOT)/lib/svc/bin 53*7c478bd9Sstevel@tonic-gate 54*7c478bd9Sstevel@tonic-gateMYCPPFLAGS = -I. -I../common -I../../../common/svc -D_REENTRANT 55*7c478bd9Sstevel@tonic-gateCPPFLAGS += $(MYCPPFLAGS) 56*7c478bd9Sstevel@tonic-gateCFLAGS += -v 57*7c478bd9Sstevel@tonic-gateMYLDLIBS = -lrt -lumem -luutil 58*7c478bd9Sstevel@tonic-gateLDLIBS += -lsecdb $(MYLDLIBS) 59*7c478bd9Sstevel@tonic-gateLINTFLAGS += -errtags -erroff=E_BAD_FORMAT_ARG_TYPE2 60*7c478bd9Sstevel@tonic-gate 61*7c478bd9Sstevel@tonic-gateCLOBBERFILES += $(MYPROG:%=%-native) 62*7c478bd9Sstevel@tonic-gate 63*7c478bd9Sstevel@tonic-gateLIBUUTIL = $(SRC)/lib/libuutil 64*7c478bd9Sstevel@tonic-gateLIBSCF = $(SRC)/lib/libscf 65*7c478bd9Sstevel@tonic-gate 66*7c478bd9Sstevel@tonic-gateSCRIPTFILE = restore_repository 67*7c478bd9Sstevel@tonic-gateROOTSCRIPTFILE = $(ROOTCMDDIR)/$(SCRIPTFILE) 68*7c478bd9Sstevel@tonic-gate 69*7c478bd9Sstevel@tonic-gate$(NATIVE_BUILD)CC = $(NATIVECC) 70*7c478bd9Sstevel@tonic-gate$(NATIVE_BUILD)LD = $(NATIVELD) 71*7c478bd9Sstevel@tonic-gate$(NATIVE_BUILD)CFLAGS = $(NATIVE_CFLAGS) 72*7c478bd9Sstevel@tonic-gate$(NATIVE_BUILD)CPPFLAGS = $(MYCPPFLAGS) -I$(LIBUUTIL)/common -I$(LIBSCF)/inc 73*7c478bd9Sstevel@tonic-gate$(NATIVE_BUILD)CPPFLAGS += -DNATIVE_BUILD 74*7c478bd9Sstevel@tonic-gate$(NATIVE_BUILD)LDFLAGS = 75*7c478bd9Sstevel@tonic-gate$(NATIVE_BUILD)LDLIBS = -L$(LIBUUTIL)/native -R $(LIBUUTIL)/native \ 76*7c478bd9Sstevel@tonic-gate $(MYLDLIBS) -ldoor 77*7c478bd9Sstevel@tonic-gate 78*7c478bd9Sstevel@tonic-gateDIRMODE = 0755 79*7c478bd9Sstevel@tonic-gateFILEMODE = 0555 80*7c478bd9Sstevel@tonic-gateOWNER = root 81*7c478bd9Sstevel@tonic-gateGROUP = sys 82*7c478bd9Sstevel@tonic-gate 83*7c478bd9Sstevel@tonic-gateSQLITEDIR = sqlite 84*7c478bd9Sstevel@tonic-gateLIBSQLITE = $(SQLITEDIR)/libsqlite.o 85*7c478bd9Sstevel@tonic-gate$(NATIVE_BUILD)LIBSQLITE = $(SQLITEDIR)/libsqlite-native.o 86*7c478bd9Sstevel@tonic-gateSQLITELINT = $(SQLITEDIR)/llib-lsqlite.ln 87*7c478bd9Sstevel@tonic-gate 88*7c478bd9Sstevel@tonic-gateOBJS += $(LIBSQLITE) 89*7c478bd9Sstevel@tonic-gate 90*7c478bd9Sstevel@tonic-gateinstall := TARGET = install 91*7c478bd9Sstevel@tonic-gateclobber := TARGET = clobber 92*7c478bd9Sstevel@tonic-gate 93*7c478bd9Sstevel@tonic-gatelint := LDLIBS += $(SQLITELINT) 94*7c478bd9Sstevel@tonic-gate 95*7c478bd9Sstevel@tonic-gate.KEEP_STATE: 96*7c478bd9Sstevel@tonic-gate.PARALLEL: $(MYOBJS) $(MYOBJS:%.o=%-native.o) 97*7c478bd9Sstevel@tonic-gate 98*7c478bd9Sstevel@tonic-gateall: $(PROG) 99*7c478bd9Sstevel@tonic-gate 100*7c478bd9Sstevel@tonic-gatenative: FRC 101*7c478bd9Sstevel@tonic-gate @cd $(LIBUUTIL)/native; pwd; $(MAKE) $(MFLAGS) install 102*7c478bd9Sstevel@tonic-gate @NATIVE_BUILD= $(MAKE) $(MFLAGS) all 103*7c478bd9Sstevel@tonic-gate 104*7c478bd9Sstevel@tonic-gate$(SQLITEDIR): FRC 105*7c478bd9Sstevel@tonic-gate @cd $(SQLITEDIR); pwd; $(MAKE) $(TARGET) 106*7c478bd9Sstevel@tonic-gate 107*7c478bd9Sstevel@tonic-gate$(SQLITEDIR)/libsqlite.o: FRC 108*7c478bd9Sstevel@tonic-gate @cd $(SQLITEDIR); pwd; $(MAKE) all 109*7c478bd9Sstevel@tonic-gate 110*7c478bd9Sstevel@tonic-gate$(SQLITEDIR)/libsqlite-native.o: FRC 111*7c478bd9Sstevel@tonic-gate @cd $(SQLITEDIR); pwd; $(MAKE) native 112*7c478bd9Sstevel@tonic-gate 113*7c478bd9Sstevel@tonic-gate$(SQLITEDIR)/llib-lsqlite.ln: FRC 114*7c478bd9Sstevel@tonic-gate @cd $(SQLITEDIR); pwd; $(MAKE) llib-lsqlite.ln 115*7c478bd9Sstevel@tonic-gate 116*7c478bd9Sstevel@tonic-gate$(PROG): $(LIBSQLITE) $(OBJS) 117*7c478bd9Sstevel@tonic-gate $(LINK.c) -o $@ $(OBJS) $(LDLIBS) $(CTFMERGE_HOOK) 118*7c478bd9Sstevel@tonic-gate $(POST_PROCESS) 119*7c478bd9Sstevel@tonic-gate 120*7c478bd9Sstevel@tonic-gate%-native.o: %.c 121*7c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< $(CTFCONVERT_HOOK) 122*7c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 123*7c478bd9Sstevel@tonic-gate 124*7c478bd9Sstevel@tonic-gate$(ROOTCMDDIR)/%: %.sh 125*7c478bd9Sstevel@tonic-gate $(INS.rename) 126*7c478bd9Sstevel@tonic-gate 127*7c478bd9Sstevel@tonic-gateinstall: all $(SQLITEDIR) $(ROOTCMD) $(ROOTVARSADMFILE) $(ROOTSCRIPTFILE) 128*7c478bd9Sstevel@tonic-gate 129*7c478bd9Sstevel@tonic-gateclean: FRC 130*7c478bd9Sstevel@tonic-gate $(RM) $(MYOBJS) $(MYOBJS:%.o=%-native.o) 131*7c478bd9Sstevel@tonic-gate 132*7c478bd9Sstevel@tonic-gateclobber: $(SQLITEDIR) 133*7c478bd9Sstevel@tonic-gate 134*7c478bd9Sstevel@tonic-gatelint: lint_SRCS 135*7c478bd9Sstevel@tonic-gate 136*7c478bd9Sstevel@tonic-gatelint_SRCS: $(SQLITELINT) 137*7c478bd9Sstevel@tonic-gate 138*7c478bd9Sstevel@tonic-gateinclude ../../Makefile.targ 139*7c478bd9Sstevel@tonic-gate 140*7c478bd9Sstevel@tonic-gateFRC: 141