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