xref: /titanic_41/usr/src/cmd/fm/fmadm/Makefile.com (revision 0a0e9771ca0211c15f3ac4466b661c145feeb9e4)
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 2009 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25
26.KEEP_STATE:
27.SUFFIXES:
28
29SRCS += fmadm.c \
30	config.c \
31	faulty.c \
32	gc.c \
33	load.c \
34	reset.c
35
36OBJS = $(SRCS:%.c=%.o)
37LINTFILES = $(SRCS:%.c=%.ln)
38
39PROG = fmadm
40ROOTPROG = $(ROOTUSRSBIN)/$(PROG)
41
42$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
43CPPFLAGS += -I. -I../common
44CFLAGS += $(CTF_FLAGS) $(CCVERBOSE) $(XSTRCONST)
45LDLIBS += -L$(ROOT)/usr/lib/fm -lfmd_adm -lfmd_msg
46LDLIBS += -lnvpair -ltopo
47LDFLAGS += -R/usr/lib/fm
48LINTFLAGS += -mnu
49
50.NO_PARALLEL:
51.PARALLEL: $(OBJS) $(LINTFILES)
52
53all: $(PROG)
54
55$(PROG): $(OBJS)
56	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
57	$(CTFMERGE) -L VERSION -o $@ $(OBJS)
58	$(POST_PROCESS)
59
60%.o: ../common/%.c
61	$(COMPILE.c) $<
62	$(CTFCONVERT_O)
63
64%.o: %.c
65	$(COMPILE.c) $<
66	$(CTFCONVERT_O)
67
68clean:
69	$(RM) $(OBJS) $(LINTFILES)
70
71clobber: clean
72	$(RM) $(PROG)
73
74%.ln: ../common/%.c
75	$(LINT.c) -c $<
76
77%.ln: %.c
78	$(LINT.c) -c $<
79
80lint: $(LINTFILES)
81	$(LINT) $(LINTFLAGS) $(LINTFILES)
82
83install_h:
84
85install: all $(ROOTPROG)
86