Makefile revision 753a6d457b330b1b29b2d3eefcd0831116ce950d
1840745dd553b2ff5b114a03cde40a2a404aa559Michael Graff#
c46bcd7c6908745e19b0b1fe18a23bbaaee553edBob Halley# CDDL HEADER START
1840745dd553b2ff5b114a03cde40a2a404aa559Michael Graff#
1840745dd553b2ff5b114a03cde40a2a404aa559Michael Graff# The contents of this file are subject to the terms of the
1840745dd553b2ff5b114a03cde40a2a404aa559Michael Graff# Common Development and Distribution License (the "License").
1840745dd553b2ff5b114a03cde40a2a404aa559Michael Graff# You may not use this file except in compliance with the License.
1840745dd553b2ff5b114a03cde40a2a404aa559Michael Graff#
1840745dd553b2ff5b114a03cde40a2a404aa559Michael Graff# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1840745dd553b2ff5b114a03cde40a2a404aa559Michael Graff# or http://www.opensolaris.org/os/licensing.
1840745dd553b2ff5b114a03cde40a2a404aa559Michael Graff# See the License for the specific language governing permissions
1840745dd553b2ff5b114a03cde40a2a404aa559Michael Graff# and limitations under the License.
1840745dd553b2ff5b114a03cde40a2a404aa559Michael Graff#
1840745dd553b2ff5b114a03cde40a2a404aa559Michael Graff# When distributing Covered Code, include this CDDL HEADER in each
1840745dd553b2ff5b114a03cde40a2a404aa559Michael Graff# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1840745dd553b2ff5b114a03cde40a2a404aa559Michael Graff# If applicable, add the following below this CDDL HEADER, with the
1840745dd553b2ff5b114a03cde40a2a404aa559Michael Graff# fields enclosed by brackets "[]" replaced with your own identifying
1840745dd553b2ff5b114a03cde40a2a404aa559Michael Graff# information: Portions Copyright [yyyy] [name of copyright owner]
1840745dd553b2ff5b114a03cde40a2a404aa559Michael Graff#
1840745dd553b2ff5b114a03cde40a2a404aa559Michael Graff# CDDL HEADER END
44fee668021c7ceef4ee1c848031d883a508b359James Brister#
44fee668021c7ceef4ee1c848031d883a508b359James Brister#
44fee668021c7ceef4ee1c848031d883a508b359James Brister# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
1840745dd553b2ff5b114a03cde40a2a404aa559Michael Graff# Use is subject to license terms.
1840745dd553b2ff5b114a03cde40a2a404aa559Michael Graff#
1840745dd553b2ff5b114a03cde40a2a404aa559Michael Graff
1840745dd553b2ff5b114a03cde40a2a404aa559Michael GraffPROG = svc.startd
b8257bd2d872546e7cc358fdf32331ce8850bca4Bob HalleyOBJS = \
1840745dd553b2ff5b114a03cde40a2a404aa559Michael Graff contract.o \
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas Gustafsson deathrow.o \
1840745dd553b2ff5b114a03cde40a2a404aa559Michael Graff dict.o \
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas Gustafsson env.o \
1840745dd553b2ff5b114a03cde40a2a404aa559Michael Graff expand.o \
1840745dd553b2ff5b114a03cde40a2a404aa559Michael Graff file.o \
1840745dd553b2ff5b114a03cde40a2a404aa559Michael Graff fork.o \
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas Gustafsson graph.o \
1840745dd553b2ff5b114a03cde40a2a404aa559Michael Graff libscf.o \
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas Gustafsson log.o \
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas Gustafsson method.o \
1840745dd553b2ff5b114a03cde40a2a404aa559Michael Graff misc.o \
440be4c866f6935ac069db79a414304507a664c2Michael Graff protocol.o \
1840745dd553b2ff5b114a03cde40a2a404aa559Michael Graff restarter.o \
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafsson specials.o \
fd15c8e32ed0c1cfd3ed737858a81966e7fbaeacAndreas Gustafsson startd.o \
f5f38e9930344a30db725816e2f1c5edb9c2ac55Andreas Gustafsson transition.o \
f5f38e9930344a30db725816e2f1c5edb9c2ac55Andreas Gustafsson wait.o \
f5f38e9930344a30db725816e2f1c5edb9c2ac55Andreas Gustafsson utmpx.o
c6e10b826ec1df8da01a7b1b4620d7e0adfcb247James Brister
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas GustafssonALLOBJS = $(OBJS) proc.o
c14c6f86ae1607eb39b8b37be25599b8cb923062Bob Halley
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas GustafssonSRCS = $(OBJS:%.o=%.c)
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas Gustafsson
173b32c660c1e4d5141b5ca740e8fab3c593652fBob HalleyPOFILES = $(ALLOBJS:%.o=%.po)
1840745dd553b2ff5b114a03cde40a2a404aa559Michael Graff
1840745dd553b2ff5b114a03cde40a2a404aa559Michael Graffinclude ../../Makefile.cmd
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas Gustafssoninclude ../Makefile.ctf
8f16e457f722681f67ee6af9c1cd39553f6dcc9aAndreas Gustafsson
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas GustafssonROOTCMDDIR= $(ROOT)/lib/svc/bin
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas GustafssonCFLAGS += -v
173b32c660c1e4d5141b5ca740e8fab3c593652fBob Halley
c6e10b826ec1df8da01a7b1b4620d7e0adfcb247James Brister$(OBJS) := CPPFLAGS += \
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafsson -I. -I../common -D_REENTRANT -D_FILE_OFFSET_BITS=64
1840745dd553b2ff5b114a03cde40a2a404aa559Michael Graff
b03758b04ea5134c805d44fcc5315c878c6f7996Andreas Gustafsson$(POFILE) := CPPFLAGS += -I. -I../common
533b0475054882ea1c81cb1ec4aa3e6750711bbcBob Halley
a55d0a9080c8ef4117d2fc27f63220a56afb2434Andreas Gustafssonproc.o := CPPFLAGS += -I. -I../common -D_REENTRANT
a55d0a9080c8ef4117d2fc27f63220a56afb2434Andreas Gustafsson
a4b6a1622b1b6672a6e0c7186167bbe3997568c6Bob HalleyLDLIBS += \
bcc1d6507b69be307fc1e0206827a0b09b10ba4bBob Halley -lcontract \
533b0475054882ea1c81cb1ec4aa3e6750711bbcBob Halley -lkstat \
a55d0a9080c8ef4117d2fc27f63220a56afb2434Andreas Gustafsson -lnvpair \
1840745dd553b2ff5b114a03cde40a2a404aa559Michael Graff -lrestart \
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas Gustafsson -lscf \
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas Gustafsson -lsysevent \
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas Gustafsson -lumem \
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas Gustafsson -luutil
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas Gustafsson
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas GustafssonLDLIBS_i386 += -lgrubmgmt
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas GustafssonLDLIBS += $(LDLIBS_$(MACH))
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas Gustafsson
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas GustafssonFILEMODE = 0555
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas GustafssonOWNER = root
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas GustafssonGROUP = sys
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas Gustafsson
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas Gustafsson# lint doesn't like the unused _umem_*_init()
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas Gustafsson# And lint thinks uadmin() is undefined.
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas Gustafssonlint_SRCS := LINTFLAGS += -U_FILE_OFFSET_BITS -xerroff=E_NAME_DEF_NOT_USED2 -u
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas Gustafssonlint_SRCS := CPPFLAGS += \
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas Gustafsson -I. -I../common -D_REENTRANT -D_FILE_OFFSET_BITS=64
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas Gustafsson
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas Gustafsson.KEEP_STATE:
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas Gustafsson
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas Gustafsson.PARALLEL: $(ALLOBJS)
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas Gustafsson
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas Gustafssonall: $(PROG)
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas Gustafsson
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas Gustafsson$(PROG): $(ALLOBJS)
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas Gustafsson $(LINK.c) -o $@ $(ALLOBJS) $(LDLIBS) $(CTFMERGE_HOOK)
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas Gustafsson $(POST_PROCESS)
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas Gustafsson
016326d111130b2810cb453d6bf2ff94f398b050Bob Halley$(POFILE): $(POFILES)
016326d111130b2810cb453d6bf2ff94f398b050Bob Halley cat $(POFILES) > $(POFILE)
016326d111130b2810cb453d6bf2ff94f398b050Bob Halley
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafssoninstall: all $(ROOTCMD)
016326d111130b2810cb453d6bf2ff94f398b050Bob Halley
c6e10b826ec1df8da01a7b1b4620d7e0adfcb247James Bristerclean:
c0564c15e73fc366a9200fc47dfcc7894382aa98Andreas Gustafsson $(RM) $(ALLOBJS)
b45b364f2255f4abfec674e5ff94b803e34b3e83Andreas Gustafsson
44fee668021c7ceef4ee1c848031d883a508b359James Bristerlint: lint_SRCS
f5f38e9930344a30db725816e2f1c5edb9c2ac55Andreas Gustafsson
f5f38e9930344a30db725816e2f1c5edb9c2ac55Andreas Gustafssoninclude ../../Makefile.targ
f5f38e9930344a30db725816e2f1c5edb9c2ac55Andreas Gustafsson