move 32-bit libs to lib/i386 subdirs & 64-bit libs to lib/
[unleashed.git] / usr / src / cmd / svc / startd / Makefile
blob86f806b7b64e7e831f95597710996c89d93cd199
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>
25 # Copyright (c) 2018, Joyent, Inc.
28 PROG = svc.startd
29 OBJS = \
30 contract.o \
31 deathrow.o \
32 dict.o \
33 env.o \
34 expand.o \
35 file.o \
36 fork.o \
37 graph.o \
38 libscf.o \
39 log.o \
40 method.o \
41 misc.o \
42 protocol.o \
43 restarter.o \
44 specials.o \
45 startd.o \
46 transition.o \
47 wait.o \
48 utmpx.o
50 ALLOBJS = $(OBJS) \
51 proc.o \
52 manifest_hash.o
54 SRCS = $(OBJS:%.o=%.c) \
55 proc.c \
56 ../common/manifest_hash.c
58 POFILES = $(OBJS:%.o=%.po) \
59 proc.po \
60 ../common/manifest_hash.po
62 include ../../Makefile.cmd
63 include ../../Makefile.ctf
65 ROOTCMDDIR= $(ROOT)/lib/svc/bin
67 $(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
68 CPPFLAGS += -I. -I../common
70 CERRWARN += -Wno-parentheses
71 CERRWARN += -Wno-unused-label
72 CERRWARN += -Wno-switch
73 CERRWARN += -Wno-uninitialized
75 # these look like real bugs here, but ...
76 SMOFF += impossible_mask,signed_integer_overflow_check
78 %.o: ../common/%.c
79 $(COMPILE.c) $(OUTPUT_OPTION) $<
80 $(POST_PROCESS_O)
82 LDLIBS += \
83 -lcontract \
84 -lkstat \
85 -lmd5 \
86 -lnvpair \
87 -lrestart \
88 -lscf \
89 -lsysevent \
90 -lumem \
91 -luutil
93 LDLIBS_i386 += -lbe
94 # we don't directly depend on anything in /usr/lib/fm, but libfmevent does
95 # (libtopo is there), so we must specify it here or we will link against
96 # libtopo on the running system
97 LDLIBS += $(LDLIBS_$(MACH)) -L $(ROOT)/lib/fm/$(MACH32) -L $(ROOT)/usr/lib/fm/$(MACH32) -lfmevent
98 LDFLAGS += -R/lib/fm/$(MACH32)
100 FILEMODE = 0555
102 .KEEP_STATE:
104 .PARALLEL: $(ALLOBJS)
106 all: $(PROG)
108 $(PROG): $(ALLOBJS)
109 $(LINK.c) -o $@ $(ALLOBJS) $(LDLIBS) $(LDFLAGS) $(CTFMERGE_HOOK)
110 $(POST_PROCESS)
112 $(POFILE): $(POFILES)
113 cat $(POFILES) > $(POFILE)
115 install: all $(ROOTCMD)
117 clean:
118 $(RM) $(ALLOBJS)
121 include ../../Makefile.targ