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 (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. 23# 24 25PROG = svc.startd 26OBJS = \ 27 contract.o \ 28 deathrow.o \ 29 dict.o \ 30 env.o \ 31 expand.o \ 32 file.o \ 33 fork.o \ 34 graph.o \ 35 libscf.o \ 36 log.o \ 37 method.o \ 38 misc.o \ 39 protocol.o \ 40 restarter.o \ 41 specials.o \ 42 startd.o \ 43 transition.o \ 44 wait.o \ 45 utmpx.o 46 47ALLOBJS = $(OBJS) \ 48 proc.o \ 49 manifest_hash.o 50 51SRCS = $(OBJS:%.o=%.c) \ 52 proc.c \ 53 ../common/manifest_hash.c 54 55POFILES = $(OBJS:%.o=%.po) \ 56 proc.po \ 57 ../common/manifest_hash.po 58 59include ../../Makefile.cmd 60include ../../Makefile.ctf 61 62ROOTCMDDIR= $(ROOT)/lib/svc/bin 63 64CFLAGS += -v 65CPPFLAGS += -I. -I../common 66 67$(OBJS) := CPPFLAGS += -D_FILE_OFFSET_BITS=64 -D_REENTRANT 68 69proc.o := CPPFLAGS += -D_REENTRANT 70 71%.o: ../common/%.c 72 $(COMPILE.c) $(OUTPUT_OPTION) $< 73 $(POST_PROCESS_O) 74 75%.ln: ../common/%.c 76 $(LINT.c) $(OUTPUT_OPTION) -c $< 77 78LDLIBS += \ 79 -lcontract \ 80 -lkstat \ 81 -lmd5 \ 82 -lnvpair \ 83 -lrestart \ 84 -lscf \ 85 -lsysevent \ 86 -lumem \ 87 -luutil 88 89LDLIBS_i386 += -lgrubmgmt 90LDLIBS += $(LDLIBS_$(MACH)) -L $(ROOT)/usr/lib/fm -lfmevent 91LDFLAGS += -R /usr/lib/fm 92 93FILEMODE = 0555 94 95# lint doesn't like the unused _umem_*_init() 96# And lint thinks uadmin() is undefined. 97lint_SRCS := LINTFLAGS += -U_FILE_OFFSET_BITS -xerroff=E_NAME_DEF_NOT_USED2 -u 98lint_SRCS := CPPFLAGS += \ 99 -I. -I../common -D_REENTRANT -D_FILE_OFFSET_BITS=64 100 101.KEEP_STATE: 102 103.PARALLEL: $(ALLOBJS) 104 105all: $(PROG) 106 107$(PROG): $(ALLOBJS) 108 $(LINK.c) -o $@ $(ALLOBJS) $(LDLIBS) $(LDFLAGS) $(CTFMERGE_HOOK) 109 $(POST_PROCESS) 110 111$(POFILE): $(POFILES) 112 cat $(POFILES) > $(POFILE) 113 114install: all $(ROOTCMD) 115 116clean: 117 $(RM) $(ALLOBJS) 118 119lint: lint_SRCS 120 121include ../../Makefile.targ 122