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 599b44c3bSlianep# Common Development and Distribution License (the "License"). 699b44c3bSlianep# 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# 22*9444c26fSTom Whitten# Copyright 2010 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate# Use is subject to license terms. 247c478bd9Sstevel@tonic-gate# 257c478bd9Sstevel@tonic-gate 267c478bd9Sstevel@tonic-gatePROG = svc.startd 277c478bd9Sstevel@tonic-gateOBJS = \ 287c478bd9Sstevel@tonic-gate contract.o \ 2970cbfe41SPhilippe Jung deathrow.o \ 307c478bd9Sstevel@tonic-gate dict.o \ 317c478bd9Sstevel@tonic-gate env.o \ 327c478bd9Sstevel@tonic-gate expand.o \ 337c478bd9Sstevel@tonic-gate file.o \ 347c478bd9Sstevel@tonic-gate fork.o \ 357c478bd9Sstevel@tonic-gate graph.o \ 367c478bd9Sstevel@tonic-gate libscf.o \ 377c478bd9Sstevel@tonic-gate log.o \ 387c478bd9Sstevel@tonic-gate method.o \ 397c478bd9Sstevel@tonic-gate misc.o \ 407c478bd9Sstevel@tonic-gate protocol.o \ 4199b44c3bSlianep restarter.o \ 427c478bd9Sstevel@tonic-gate specials.o \ 437c478bd9Sstevel@tonic-gate startd.o \ 4499b44c3bSlianep transition.o \ 457c478bd9Sstevel@tonic-gate wait.o \ 467c478bd9Sstevel@tonic-gate utmpx.o 477c478bd9Sstevel@tonic-gate 48*9444c26fSTom WhittenALLOBJS = $(OBJS) \ 49*9444c26fSTom Whitten proc.o \ 50*9444c26fSTom Whitten manifest_hash.o 517c478bd9Sstevel@tonic-gate 52*9444c26fSTom WhittenSRCS = $(OBJS:%.o=%.c) \ 53*9444c26fSTom Whitten proc.c \ 54*9444c26fSTom Whitten ../common/manifest_hash.c 557c478bd9Sstevel@tonic-gate 56*9444c26fSTom WhittenPOFILES = $(OBJS:%.o=%.po) \ 57*9444c26fSTom Whitten proc.po \ 58*9444c26fSTom Whitten ../common/manifest_hash.po 597c478bd9Sstevel@tonic-gate 607c478bd9Sstevel@tonic-gateinclude ../../Makefile.cmd 61e0ad97e3SJonathan Adamsinclude ../../Makefile.ctf 627c478bd9Sstevel@tonic-gate 637c478bd9Sstevel@tonic-gateROOTCMDDIR= $(ROOT)/lib/svc/bin 647c478bd9Sstevel@tonic-gate 657c478bd9Sstevel@tonic-gateCFLAGS += -v 66*9444c26fSTom WhittenCPPFLAGS += -I. -I../common 677c478bd9Sstevel@tonic-gate 68*9444c26fSTom Whitten$(OBJS) := CPPFLAGS += -D_FILE_OFFSET_BITS=64 -D_REENTRANT 697c478bd9Sstevel@tonic-gate 70*9444c26fSTom Whittenproc.o := CPPFLAGS += -D_REENTRANT 717c478bd9Sstevel@tonic-gate 72*9444c26fSTom Whitten%.o: ../common/%.c 73*9444c26fSTom Whitten $(COMPILE.c) $(OUTPUT_OPTION) $< 74*9444c26fSTom Whitten $(POST_PROCESS_O) 75*9444c26fSTom Whitten 76*9444c26fSTom Whitten%.ln: ../common/%.c 77*9444c26fSTom Whitten $(LINT.c) $(OUTPUT_OPTION) -c $< 787c478bd9Sstevel@tonic-gate 797c478bd9Sstevel@tonic-gateLDLIBS += \ 807c478bd9Sstevel@tonic-gate -lcontract \ 817c478bd9Sstevel@tonic-gate -lkstat \ 82*9444c26fSTom Whitten -lmd5 \ 837c478bd9Sstevel@tonic-gate -lnvpair \ 847c478bd9Sstevel@tonic-gate -lrestart \ 857c478bd9Sstevel@tonic-gate -lscf \ 867c478bd9Sstevel@tonic-gate -lsysevent \ 877c478bd9Sstevel@tonic-gate -lumem \ 887c478bd9Sstevel@tonic-gate -luutil 897c478bd9Sstevel@tonic-gate 90753a6d45SSherry MooreLDLIBS_i386 += -lgrubmgmt 91753a6d45SSherry MooreLDLIBS += $(LDLIBS_$(MACH)) 92753a6d45SSherry Moore 937c478bd9Sstevel@tonic-gateFILEMODE = 0555 947c478bd9Sstevel@tonic-gate 957c478bd9Sstevel@tonic-gate# lint doesn't like the unused _umem_*_init() 967c478bd9Sstevel@tonic-gate# And lint thinks uadmin() is undefined. 977c478bd9Sstevel@tonic-gatelint_SRCS := LINTFLAGS += -U_FILE_OFFSET_BITS -xerroff=E_NAME_DEF_NOT_USED2 -u 987c478bd9Sstevel@tonic-gatelint_SRCS := CPPFLAGS += \ 997c478bd9Sstevel@tonic-gate -I. -I../common -D_REENTRANT -D_FILE_OFFSET_BITS=64 1007c478bd9Sstevel@tonic-gate 1017c478bd9Sstevel@tonic-gate.KEEP_STATE: 1027c478bd9Sstevel@tonic-gate 1037c478bd9Sstevel@tonic-gate.PARALLEL: $(ALLOBJS) 1047c478bd9Sstevel@tonic-gate 1057c478bd9Sstevel@tonic-gateall: $(PROG) 1067c478bd9Sstevel@tonic-gate 1077c478bd9Sstevel@tonic-gate$(PROG): $(ALLOBJS) 108e0ad97e3SJonathan Adams $(LINK.c) -o $@ $(ALLOBJS) $(LDLIBS) 1097c478bd9Sstevel@tonic-gate $(POST_PROCESS) 1107c478bd9Sstevel@tonic-gate 1117c478bd9Sstevel@tonic-gate$(POFILE): $(POFILES) 1127c478bd9Sstevel@tonic-gate cat $(POFILES) > $(POFILE) 1137c478bd9Sstevel@tonic-gate 1147c478bd9Sstevel@tonic-gateinstall: all $(ROOTCMD) 1157c478bd9Sstevel@tonic-gate 1167c478bd9Sstevel@tonic-gateclean: 1177c478bd9Sstevel@tonic-gate $(RM) $(ALLOBJS) 1187c478bd9Sstevel@tonic-gate 1197c478bd9Sstevel@tonic-gatelint: lint_SRCS 1207c478bd9Sstevel@tonic-gate 1217c478bd9Sstevel@tonic-gateinclude ../../Makefile.targ 122