xref: /titanic_52/usr/src/cmd/fm/schemes/Makefile.com (revision 5d54f3d8999eac1762fe0a8c7177d20f1f201fae)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26#ident	"%Z%%M%	%I%	%E% SMI"
27
28.KEEP_STATE:
29.SUFFIXES:
30
31include ../../../Makefile.cmd
32SCHEME :sh= basename `pwd`
33
34#
35# For now, we assume a scheme is named after its directory and its source file
36# is named 'scheme.c'.  If schemes get more complicated this can be enhanced
37# to derive the values from the lower-level Makefiles.
38#
39PROG = $(SCHEME:%=%.so)
40SRCS = scheme.c
41OBJS = $(SRCS:%.c=%.o)
42
43ROOTPROG = $(ROOT)/usr/lib/fm/fmd/schemes/$(PROG)
44MAPFILE = ../../fmd/common/fmd_fmri.map
45
46LINTFLAGS += -u
47LINTFILES = $(SRCS:%.c=%.ln)
48
49CFLAGS += $(CTF_FLAGS) $(CCVERBOSE) $(XSTRCONST) $(CC_PICFLAGS)
50CFLAGS += -G $(XREGSFLAG)
51CPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D$(MACH) -I.
52LDFLAGS += $(ZTEXT) $(ZCOMBRELOC) $(ZDEFS) $(ZIGNORE) -M$(MAPFILE)
53LDLIBS += -lnvpair -lc
54