8158 Want named threads API
[unleashed.git] / usr / src / cmd / svc / startd / Makefile
blob0479bc97b861ee5ff5f53fa28b7af73db5a9d527
2 # CDDL HEADER START
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.
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.
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]
19 # CDDL HEADER END
22 # Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
23 # Copyright 2012 Milan Jurik. All rights reserved.
24 # Copyright 2016 Toomas Soome <tsoome@me.com>
27 PROG = svc.startd
28 OBJS = \
29 contract.o \
30 deathrow.o \
31 dict.o \
32 env.o \
33 expand.o \
34 file.o \
35 fork.o \
36 graph.o \
37 libscf.o \
38 log.o \
39 method.o \
40 misc.o \
41 protocol.o \
42 restarter.o \
43 specials.o \
44 startd.o \
45 transition.o \
46 wait.o \
47 utmpx.o
49 ALLOBJS = $(OBJS) \
50 proc.o \
51 manifest_hash.o
53 SRCS = $(OBJS:%.o=%.c) \
54 proc.c \
55 ../common/manifest_hash.c
57 POFILES = $(OBJS:%.o=%.po) \
58 proc.po \
59 ../common/manifest_hash.po
61 include ../../Makefile.cmd
62 include ../../Makefile.ctf
64 ROOTCMDDIR= $(ROOT)/lib/svc/bin
66 $(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
67 CFLAGS += $(CCVERBOSE)
68 CPPFLAGS += -I. -I../common
70 CERRWARN += -_gcc=-Wno-parentheses
71 CERRWARN += -_gcc=-Wno-unused-label
72 CERRWARN += -_gcc=-Wno-switch
73 CERRWARN += -_gcc=-Wno-uninitialized
75 $(OBJS) := CPPFLAGS += -D_FILE_OFFSET_BITS=64 -D_REENTRANT
77 proc.o := CPPFLAGS += -D_REENTRANT
79 %.o: ../common/%.c
80 $(COMPILE.c) $(OUTPUT_OPTION) $<
81 $(POST_PROCESS_O)
83 %.ln: ../common/%.c
84 $(LINT.c) $(OUTPUT_OPTION) -c $<
86 LDLIBS += \
87 -lcontract \
88 -lkstat \
89 -lmd5 \
90 -lnvpair \
91 -lrestart \
92 -lscf \
93 -lsysevent \
94 -lumem \
95 -luutil
97 LDLIBS_i386 += -lbe
98 LDLIBS += $(LDLIBS_$(MACH)) -L $(ROOT)/lib/fm -lfmevent
99 LDFLAGS += -R /lib/fm
101 FILEMODE = 0555
103 # lint doesn't like the unused _umem_*_init()
104 # And lint thinks uadmin() is undefined.
105 lint_SRCS := LINTFLAGS += -U_FILE_OFFSET_BITS -xerroff=E_NAME_DEF_NOT_USED2 -u
106 lint_SRCS := CPPFLAGS += \
107 -I. -I../common -D_REENTRANT -D_FILE_OFFSET_BITS=64
109 .KEEP_STATE:
111 .PARALLEL: $(ALLOBJS)
113 all: $(PROG)
115 $(PROG): $(ALLOBJS)
116 $(LINK.c) -o $@ $(ALLOBJS) $(LDLIBS) $(LDFLAGS) $(CTFMERGE_HOOK)
117 $(POST_PROCESS)
119 $(POFILE): $(POFILES)
120 cat $(POFILES) > $(POFILE)
122 install: all $(ROOTCMD)
124 clean:
125 $(RM) $(ALLOBJS)
127 lint: lint_SRCS
129 include ../../Makefile.targ