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
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.
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]
23 # Copyright 2006 Sun Microsystems, Inc. All rights reserved.
24 # Use is subject to license terms.
44 ROOTPDIR = $(ROOT)/usr/lib/fm/fmd
45 ROOTPROG = $(ROOTPDIR)/$(PROG)
46 OBJS = $(SRCS:%.c=%.o) inj_grammar.o inj_lex.o
47 LINTFILES = $(SRCS:%.c=%.ln)
48 CLEANFILES += inj_grammar.c inj_grammar.h inj_lex.c y.tab.h y.tab.c
50 CPPFLAGS += -I. -I../common
51 CFLAGS += $(CCVERBOSE) $(CTF_FLAGS)
52 CERRWARN += -_gcc=-Wno-switch
53 CERRWARN += -_gcc=-Wno-uninitialized
54 CERRWARN += -_gcc=-Wno-type-limits
55 CERRWARN += -_gcc=-Wno-unused-label
56 CERRWARN += -_gcc=-Wno-unused-variable
57 LDLIBS += -L$(ROOT)/usr/lib/fm -lfmd_log -lsysevent -lnvpair -lumem
58 LDFLAGS += -R/usr/lib/fm
65 .PARALLEL: $(OBJS) $(LINTFILES)
70 $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
71 $(CTFMERGE) -L VERSION -o $@ $(OBJS)
74 inj_lex.c: ../common/inj_lex.l inj_grammar.c
75 $(LEX) $(LFLAGS) ../common/inj_lex.l > $@
77 inj_grammar.c: ../common/inj_grammar.y
78 $(YACC) $(YFLAGS) ../common/inj_grammar.y
79 $(MV) y.tab.c inj_grammar.c
80 $(MV) y.tab.h inj_grammar.h
91 $(RM) $(OBJS) $(LINTFILES) $(CLEANFILES)
103 $(LINT.c) $(LINTFILES) $(LDLIBS)
108 $(ROOTPDIR): $(ROOT)/usr/lib/fm
116 install: all $(ROOTPDIR) $(ROOTPROG)