xref: /illumos-gate/usr/src/cmd/fm/eversholt/native/Makefile.com (revision 45ede40b2394db7967e59f19288fae9b62efd4aa)
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
27.KEEP_STATE:
28
29PROG = esc
30
31include $(SRC)/cmd/fm/eversholt/Makefile.esc.com
32
33#
34# This is a version of esc we're going to use in the build. Change most
35# things to be their native counterparts.
36#
37CC = $(NATIVECC)
38LD = $(NATIVELD)
39
40EFTCLASS = writer
41LOCALOBJS = escmain.o
42OBJS = $(LOCALOBJS) $(COMMONOBJS)
43SRCS = $(LOCALOBJS:.o=.c) $(COMMONSRCS)
44
45CPPFLAGS = $(NATIVE_CPPFLAGS) $(BASECPPFLAGS) -I../../esc/common
46CFLAGS = $(NATIVE_CFLAGS) -DESC $(CTF_FLAGS)
47LDLIBS = -lumem
48NATIVE_LIBS = libumem.so libc.so
49
50all: $(PROG)
51
52install: all
53
54$(PROG): $(OBJS)
55	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
56	$(CTFMRG)
57	$(POST_PROCESS)
58
59clean:
60	$(RM) $(OBJS) y.output y.tab.c y.tab.h
61
62clobber: clean
63	$(RM) $(PROG)
64
65esclex.o: escparse.o
66
67%.o: ../../esc/common/%.c
68	$(COMPILE.c) $<
69	$(CTFCONVO)
70