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# 22f6e214c7SGavin Maltby# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. 23a9cdd230SMilan Jurik# Copyright 2012 Milan Jurik. All rights reserved. 24a6424c75SToomas Soome# Copyright 2016 Toomas Soome <tsoome@me.com> 255661bb76SJohn Levon# Copyright (c) 2018, Joyent, Inc. 26*a28480feSAndy Fiddaman# Copyright 2021 OmniOS Community Edition (OmniOSce) Association. 277c478bd9Sstevel@tonic-gate# 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gatePROG = svc.startd 307c478bd9Sstevel@tonic-gateOBJS = \ 317c478bd9Sstevel@tonic-gate contract.o \ 3270cbfe41SPhilippe Jung deathrow.o \ 337c478bd9Sstevel@tonic-gate dict.o \ 347c478bd9Sstevel@tonic-gate env.o \ 357c478bd9Sstevel@tonic-gate expand.o \ 367c478bd9Sstevel@tonic-gate file.o \ 377c478bd9Sstevel@tonic-gate fork.o \ 387c478bd9Sstevel@tonic-gate graph.o \ 397c478bd9Sstevel@tonic-gate libscf.o \ 407c478bd9Sstevel@tonic-gate log.o \ 417c478bd9Sstevel@tonic-gate method.o \ 427c478bd9Sstevel@tonic-gate misc.o \ 437c478bd9Sstevel@tonic-gate protocol.o \ 4499b44c3bSlianep restarter.o \ 457c478bd9Sstevel@tonic-gate specials.o \ 467c478bd9Sstevel@tonic-gate startd.o \ 4799b44c3bSlianep transition.o \ 487c478bd9Sstevel@tonic-gate wait.o \ 497c478bd9Sstevel@tonic-gate utmpx.o 507c478bd9Sstevel@tonic-gate 519444c26fSTom WhittenALLOBJS = $(OBJS) \ 529444c26fSTom Whitten proc.o \ 53*a28480feSAndy Fiddaman definit.o \ 549444c26fSTom Whitten manifest_hash.o 557c478bd9Sstevel@tonic-gate 569444c26fSTom WhittenSRCS = $(OBJS:%.o=%.c) \ 579444c26fSTom Whitten proc.c \ 58*a28480feSAndy Fiddaman $(SRC)/common/definit/definit.c \ 599444c26fSTom Whitten ../common/manifest_hash.c 607c478bd9Sstevel@tonic-gate 619444c26fSTom WhittenPOFILES = $(OBJS:%.o=%.po) \ 629444c26fSTom Whitten proc.po \ 639444c26fSTom Whitten ../common/manifest_hash.po 647c478bd9Sstevel@tonic-gate 657c478bd9Sstevel@tonic-gateinclude ../../Makefile.cmd 66e0ad97e3SJonathan Adamsinclude ../../Makefile.ctf 677c478bd9Sstevel@tonic-gate 68a9cdd230SMilan Jurik$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG 697014882cSRichard LoweCFLAGS += $(CCVERBOSE) 70*a28480feSAndy FiddamanCPPFLAGS += -I. -I../common -I$(SRC)/common/definit 717c478bd9Sstevel@tonic-gate 727014882cSRichard LoweCERRWARN += -_gcc=-Wno-parentheses 737014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-label 747014882cSRichard LoweCERRWARN += -_gcc=-Wno-switch 75d3b5f563SJohn LevonCERRWARN += $(CNOWARN_UNINIT) 767014882cSRichard Lowe 775661bb76SJohn Levon# these look like real bugs here, but ... 785661bb76SJohn LevonSMOFF += impossible_mask,signed_integer_overflow_check 795661bb76SJohn Levon 809444c26fSTom Whitten$(OBJS) := CPPFLAGS += -D_FILE_OFFSET_BITS=64 -D_REENTRANT 819444c26fSTom Whitten 829444c26fSTom Whittenproc.o := CPPFLAGS += -D_REENTRANT 837c478bd9Sstevel@tonic-gate 849444c26fSTom Whitten%.o: ../common/%.c 859444c26fSTom Whitten $(COMPILE.c) $(OUTPUT_OPTION) $< 869444c26fSTom Whitten $(POST_PROCESS_O) 877c478bd9Sstevel@tonic-gate 88*a28480feSAndy Fiddaman%.o: $(SRC)/common/definit/%.c 89*a28480feSAndy Fiddaman $(COMPILE.c) $(OUTPUT_OPTION) $< 90*a28480feSAndy Fiddaman $(POST_PROCESS_O) 917c478bd9Sstevel@tonic-gate 927c478bd9Sstevel@tonic-gateLDLIBS += \ 937c478bd9Sstevel@tonic-gate -lcontract \ 947c478bd9Sstevel@tonic-gate -lkstat \ 959444c26fSTom Whitten -lmd5 \ 967c478bd9Sstevel@tonic-gate -lnvpair \ 977c478bd9Sstevel@tonic-gate -lrestart \ 987c478bd9Sstevel@tonic-gate -lscf \ 997c478bd9Sstevel@tonic-gate -lsysevent \ 1007c478bd9Sstevel@tonic-gate -lumem \ 1017c478bd9Sstevel@tonic-gate -luutil 1027c478bd9Sstevel@tonic-gate 10342c24f1cSRobert Mustacchi# 10442c24f1cSRobert Mustacchi# While svc.startd only searches for libfmevent, which is in 10542c24f1cSRobert Mustacchi# $(ROOT)/lib/fm, when resolving dependencies it needs to know to search 10642c24f1cSRobert Mustacchi# for those in $(ROOT)/usr/lib/fm. However, we don't need a runpath 10742c24f1cSRobert Mustacchi# because libfmevent has that properly set already, but it doesn't help 10842c24f1cSRobert Mustacchi# us during the build. 10942c24f1cSRobert Mustacchi# 110a6424c75SToomas SoomeLDLIBS_i386 += -lbe 11142c24f1cSRobert MustacchiLDLIBS += $(LDLIBS_$(MACH)) -L$(ROOT)/lib/fm -lfmevent \ 11242c24f1cSRobert Mustacchi -L$(ROOT)/usr/lib/fm 11342c24f1cSRobert MustacchiLDFLAGS += -R/lib/fm 114753a6d45SSherry Moore 1157c478bd9Sstevel@tonic-gateFILEMODE = 0555 1167c478bd9Sstevel@tonic-gate 1177c478bd9Sstevel@tonic-gate.KEEP_STATE: 1187c478bd9Sstevel@tonic-gate 1197c478bd9Sstevel@tonic-gate.PARALLEL: $(ALLOBJS) 1207c478bd9Sstevel@tonic-gate 1217c478bd9Sstevel@tonic-gateall: $(PROG) 1227c478bd9Sstevel@tonic-gate 1237c478bd9Sstevel@tonic-gate$(PROG): $(ALLOBJS) 124f6e214c7SGavin Maltby $(LINK.c) -o $@ $(ALLOBJS) $(LDLIBS) $(LDFLAGS) $(CTFMERGE_HOOK) 1257c478bd9Sstevel@tonic-gate $(POST_PROCESS) 1267c478bd9Sstevel@tonic-gate 1277c478bd9Sstevel@tonic-gate$(POFILE): $(POFILES) 1287c478bd9Sstevel@tonic-gate cat $(POFILES) > $(POFILE) 1297c478bd9Sstevel@tonic-gate 130f6c47fdeSJoshua M. Clulowinstall: all $(ROOTLIBSVCBINPROG) 1317c478bd9Sstevel@tonic-gate 1327c478bd9Sstevel@tonic-gateclean: 1337c478bd9Sstevel@tonic-gate $(RM) $(ALLOBJS) 1347c478bd9Sstevel@tonic-gate 1357c478bd9Sstevel@tonic-gateinclude ../../Makefile.targ 136