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