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