17c478bd9Sstevel@tonic-gate# 27c478bd9Sstevel@tonic-gate# CDDL HEADER START 37c478bd9Sstevel@tonic-gate# 47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 534709573Sraf# Common Development and Distribution License (the "License"). 634709573Sraf# You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate# 87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate# and limitations under the License. 127c478bd9Sstevel@tonic-gate# 137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate# 197c478bd9Sstevel@tonic-gate# CDDL HEADER END 207c478bd9Sstevel@tonic-gate# 217c478bd9Sstevel@tonic-gate# 2224fe0b3bSjmcp# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate# Use is subject to license terms. 247c478bd9Sstevel@tonic-gate# 256970e7c5SAndrew Stormont# Copyright 2015 RackTop Systems. 266970e7c5SAndrew Stormont# 273e3015ceSJohn Levon# Copyright 2020 Joyent, Inc. 28efe51d0cSJohn Levon# 297c478bd9Sstevel@tonic-gate 307c478bd9Sstevel@tonic-gateMYPROG = svc.configd 317c478bd9Sstevel@tonic-gateMYOBJS = \ 327c478bd9Sstevel@tonic-gate backend.o \ 337c478bd9Sstevel@tonic-gate configd.o \ 347c478bd9Sstevel@tonic-gate client.o \ 357c478bd9Sstevel@tonic-gate file_object.o \ 367c478bd9Sstevel@tonic-gate maindoor.o \ 377c478bd9Sstevel@tonic-gate object.o \ 387c478bd9Sstevel@tonic-gate rc_node.o \ 397c478bd9Sstevel@tonic-gate snapshot.o 407c478bd9Sstevel@tonic-gate 417c478bd9Sstevel@tonic-gatePROG = $(MYPROG) 427c478bd9Sstevel@tonic-gateOBJS = $(MYOBJS) 437c478bd9Sstevel@tonic-gate 447c478bd9Sstevel@tonic-gateSRCS = $(MYOBJS:%.o=%.c) 457c478bd9Sstevel@tonic-gate 467c478bd9Sstevel@tonic-gateinclude ../../Makefile.cmd 47e0ad97e3SJonathan Adamsinclude ../../Makefile.ctf 487c478bd9Sstevel@tonic-gate 497c478bd9Sstevel@tonic-gateNATIVE_BUILD=$(POUND_SIGN) 507c478bd9Sstevel@tonic-gate$(NATIVE_BUILD)PROG = $(MYPROG:%=%-native) 517c478bd9Sstevel@tonic-gate$(NATIVE_BUILD)OBJS = $(MYOBJS:%.o=%-native.o) 527c478bd9Sstevel@tonic-gate 5391d7f85eSGordon RossMYCPPFLAGS = -I. -I../common -I../../../common/svc \ 5491d7f85eSGordon Ross -I$(ROOT)/usr/include/sqlite-sys -D_REENTRANT 557c478bd9Sstevel@tonic-gateCPPFLAGS += $(MYCPPFLAGS) 567014882cSRichard LoweCFLAGS += $(CCVERBOSE) 577014882cSRichard LoweCERRWARN += -_gcc=-Wno-parentheses 587014882cSRichard LoweCERRWARN += -_gcc=-Wno-type-limits 597014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-label 607014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-variable 617014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-function 62d3b5f563SJohn LevonCERRWARN += $(CNOWARN_UNINIT) 63efe51d0cSJohn Levon 64efe51d0cSJohn Levon# strange false positive 65efe51d0cSJohn LevonSMOFF += free 66efe51d0cSJohn Levon 676970e7c5SAndrew StormontMYLDLIBS = -lumem -luutil 686970e7c5SAndrew StormontLDLIBS += -lsecdb -lbsm $(MYLDLIBS) 697c478bd9Sstevel@tonic-gate 707c478bd9Sstevel@tonic-gateCLOBBERFILES += $(MYPROG:%=%-native) 717c478bd9Sstevel@tonic-gate 727c478bd9Sstevel@tonic-gateLIBUUTIL = $(SRC)/lib/libuutil 737c478bd9Sstevel@tonic-gateLIBSCF = $(SRC)/lib/libscf 747c478bd9Sstevel@tonic-gate 757c478bd9Sstevel@tonic-gateSCRIPTFILE = restore_repository 76f6c47fdeSJoshua M. ClulowROOTSCRIPTFILE = $(ROOTLIBSVCBIN)/$(SCRIPTFILE) 777c478bd9Sstevel@tonic-gate 7891d7f85eSGordon Ross# 7901416760SJohn Levon# Native variant (used in ../seed). 8091d7f85eSGordon Ross# 8101416760SJohn Levon$(NATIVE_BUILD)NATIVE_LIBS += libumem.so libc.so 827c478bd9Sstevel@tonic-gate$(NATIVE_BUILD)CC = $(NATIVECC) 837c478bd9Sstevel@tonic-gate$(NATIVE_BUILD)LD = $(NATIVELD) 847c478bd9Sstevel@tonic-gate$(NATIVE_BUILD)CFLAGS = $(NATIVE_CFLAGS) 857c478bd9Sstevel@tonic-gate$(NATIVE_BUILD)CPPFLAGS = $(MYCPPFLAGS) -I$(LIBUUTIL)/common -I$(LIBSCF)/inc 867c478bd9Sstevel@tonic-gate$(NATIVE_BUILD)CPPFLAGS += -DNATIVE_BUILD 875801b0f0SToomas Soome$(NATIVE_BUILD)LDFLAGS = $(BDIRECT) 88494f7e12SKeith M Wesolowski$(NATIVE_BUILD)LDLIBS = -L$(ADJUNCT_PROTO)/usr/lib -R$(ADJUNCT_PROTO)/usr/lib \ 89494f7e12SKeith M Wesolowski -L$(LIBUUTIL)/native -R $(LIBUUTIL)/native $(MYLDLIBS) 907c478bd9Sstevel@tonic-gate 917c478bd9Sstevel@tonic-gateDIRMODE = 0755 927c478bd9Sstevel@tonic-gateFILEMODE = 0555 937c478bd9Sstevel@tonic-gate 9491d7f85eSGordon RossOBJSQLITE = 9591d7f85eSGordon RossLIBSQLITE = -lsqlite-sys 9691d7f85eSGordon Ross$(NATIVE_BUILD)OBJSQLITE = $(ROOT)/lib/libsqlite-native.o 9791d7f85eSGordon Ross$(NATIVE_BUILD)LIBSQLITE = 987c478bd9Sstevel@tonic-gate 9991d7f85eSGordon RossOBJS += $(OBJSQLITE) 10091d7f85eSGordon RossLDLIBS += $(LIBSQLITE) 1017c478bd9Sstevel@tonic-gate 1027c478bd9Sstevel@tonic-gateinstall := TARGET = install 1037c478bd9Sstevel@tonic-gateclobber := TARGET = clobber 1047c478bd9Sstevel@tonic-gate 1057c478bd9Sstevel@tonic-gate.KEEP_STATE: 1067c478bd9Sstevel@tonic-gate.PARALLEL: $(MYOBJS) $(MYOBJS:%.o=%-native.o) 1077c478bd9Sstevel@tonic-gate 1087c478bd9Sstevel@tonic-gateall: $(PROG) 1097c478bd9Sstevel@tonic-gate 1107c478bd9Sstevel@tonic-gatenative: FRC 111*f96a0cefSRichard Lowe @cd $(LIBUUTIL)/native; pwd; $(MAKE) install 112*f96a0cefSRichard Lowe @NATIVE_BUILD= $(MAKE) all 1137c478bd9Sstevel@tonic-gate 114c5c4113dSnw141292$(PROG): $(OBJS) 115e0ad97e3SJonathan Adams $(LINK.c) -o $@ $(OBJS) $(LDLIBS) 1167c478bd9Sstevel@tonic-gate $(POST_PROCESS) 1177c478bd9Sstevel@tonic-gate 1187c478bd9Sstevel@tonic-gate%-native.o: %.c 119e0ad97e3SJonathan Adams $(COMPILE.c) -o $@ $< 1207c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1217c478bd9Sstevel@tonic-gate 122f6c47fdeSJoshua M. Clulow$(ROOTLIBSVCBIN)/%: %.sh 1237c478bd9Sstevel@tonic-gate $(INS.rename) 1247c478bd9Sstevel@tonic-gate 125f6c47fdeSJoshua M. Clulowinstall: all $(ROOTLIBSVCBINPROG) $(ROOTVARSADMFILE) $(ROOTSCRIPTFILE) 1267c478bd9Sstevel@tonic-gate 1277c478bd9Sstevel@tonic-gateclean: FRC 1287c478bd9Sstevel@tonic-gate $(RM) $(MYOBJS) $(MYOBJS:%.o=%-native.o) 1297c478bd9Sstevel@tonic-gate 130c5c4113dSnw141292clobber: 1317c478bd9Sstevel@tonic-gate 1327c478bd9Sstevel@tonic-gateinclude ../../Makefile.targ 1337c478bd9Sstevel@tonic-gate 1347c478bd9Sstevel@tonic-gateFRC: 135