xref: /titanic_44/usr/src/cmd/fm/eversholt/Makefile.esc.com (revision 749f21d359d8fbd020c974a1a5227316221bfc9c)
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 2004 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26#ident	"%Z%%M%	%I%	%E% SMI"
27#
28# include makefile for eversholt common files
29#
30#
31
32FMADIR = $(SRC)/cmd/fm
33EVERDIR = $(FMADIR)/eversholt
34EVERCMNSRC = $(EVERDIR)/common
35
36EFTCLASS = reader
37writer_WRTOBJ = eftwrite.o
38reader_WRTOBJ =
39
40CMNOBJS = alloc.o check.o eftread.o esclex.o io.o literals.o lut.o \
41	out.o ptree.o stable.o stats.o tree.o $($(EFTCLASS)_WRTOBJ)
42
43COMMONOBJS = escparse.o $(CMNOBJS)
44COMMONSRCS = $(COMMONOBJS:%.o=$(EVERCMNSRC)/%.c)
45
46LINTSRCS = $(CMNOBJS:%.o=$(EVERCMNSRC)/%.c)
47LINTFLAGS = -mnux
48
49CPPFLAGS += -I$(EVERCMNSRC) -I.
50CFLAGS += -v
51
52CTFCONVO = $(CTFCONVERT_O)
53CTFMRG = $(CTFMERGE) -L VERSION -o $@ $(OBJS)
54
55debug := CTFCONVO = STRIPSTABS_KEEP_STABS= $(CTFCONVERT_O)
56debug := CTFMRG = STRIPSTABS_KEEP_STABS= $(CTFMERGE) -L VERSION -o $@ $(OBJS)
57debug := COPTFLAG =
58debug := COPTFLAG64 =
59
60ROOTPDIR = $(ROOT)/usr/lib/fm
61ROOTPROG = $(ROOTPDIR)/$(PROG)
62
63install: $(PROG) $(ROOTPROG)
64
65install_h: $(ROOTHDIR) $(ROOTHDRS)
66
67lint:	$(LINTSRCS)
68	$(LINT.c) $(LINTSRCS) $(LDLIBS)
69
70%.o: %.c
71	$(COMPILE.c) $<
72	$(CTFCONVO)
73
74%.o: $(EVERCMNSRC)/%.c
75	$(COMPILE.c) $<
76	$(CTFCONVO)
77
78escparse.o: $(EVERCMNSRC)/escparse.y
79	$(YACC) -dtv $(EVERCMNSRC)/escparse.y
80	$(COMPILE.c) -DYYDEBUG -c -o $@ y.tab.c
81	$(CTFCONVO)
82
83$(ROOT)/usr/lib/fm:
84	$(INS.dir)
85
86$(ROOTPDIR): $(ROOT)/usr/lib/fm
87	$(INS.dir)
88
89$(ROOTPDIR)/%: %
90	$(INS.file)
91
92