move 32-bit libs to lib/i386 subdirs & 64-bit libs to lib/
[unleashed.git] / usr / src / cmd / fm / fminject / Makefile.com
blobe510092fcbe5ffbe0ded0128c062d539223d5f6a
2 # CDDL HEADER START
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.
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]
20 # CDDL HEADER END
23 # Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24 # Use is subject to license terms.
27 .KEEP_STATE:
28 .SUFFIXES:
30 SRCS += \
31         inj_cmds.c \
32         inj_decl.c \
33         inj_defn.c \
34         inj_err.c \
35         inj_hash.c \
36         inj_list.c \
37         inj_log.c \
38         inj_main.c \
39         inj_string.c \
40         inj_umem.c \
41         inj_util.c
43 PROG = fminject
44 ROOTPDIR = $(ROOT)/usr/lib/fm/fmd
45 ROOTPROG = $(ROOTPDIR)/$(PROG)
46 OBJS = $(SRCS:%.c=%.o) inj_grammar.o inj_lex.o
47 CLEANFILES += inj_grammar.c inj_grammar.h inj_lex.c y.tab.h y.tab.c
49 CPPFLAGS += -I. -I../common
50 CFLAGS64 += $(CTF_FLAGS)
51 CERRWARN += -Wno-switch
52 CERRWARN += -Wno-uninitialized
53 CERRWARN += -Wno-type-limits
54 CERRWARN += -Wno-unused-label
55 CERRWARN += -Wno-unused-variable
56 LDLIBS64 += -L$(ROOT)/usr/lib/fm -lfmd_log -lsysevent -lnvpair -lumem
57 LDFLAGS64 += -R/usr/lib/fm
58 STRIPFLAG =
60 LFLAGS += -t
61 YFLAGS = -d
63 .PARALLEL: $(OBJS)
65 all: $(PROG)
67 $(PROG): $(OBJS)
68         $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
69         $(CTFMERGE) -L VERSION -o $@ $(OBJS)
70         $(POST_PROCESS)
72 inj_lex.c: ../common/inj_lex.l inj_grammar.c
73         $(LEX) $(LFLAGS) ../common/inj_lex.l > $@
75 inj_grammar.c: ../common/inj_grammar.y
76         $(YACC) $(YFLAGS) ../common/inj_grammar.y
77         $(MV) y.tab.c inj_grammar.c
78         $(MV) y.tab.h inj_grammar.h
80 %.o: %.c
81         $(COMPILE.c) $<
82         $(CTFCONVERT_O)
84 %.o: ../common/%.c
85         $(COMPILE.c) $<
86         $(CTFCONVERT_O)
88 clean:
89         $(RM) $(OBJS) $(CLEANFILES)
91 clobber: clean
92         $(RM) $(PROG)
94 $(ROOT)/usr/lib/fm:
95         $(INS.dir)
97 $(ROOTPDIR): $(ROOT)/usr/lib/fm
98         $(INS.dir)
100 $(ROOTPDIR)/%: %
101         $(INS.file)
103 install_h:
105 install: all $(ROOTPDIR) $(ROOTPROG)