xref: /illumos-gate/usr/src/cmd/fm/eversholt/files/Makefile.com (revision 22028508fd28d36ff74dc02c5774a8ba1f0db045)
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 2009 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25
26.SUFFIXES: .eft .esc
27
28ESC=$(SRC)/cmd/fm/eversholt/native/$(MACH)/esc
29
30include $(SRC)/cmd/Makefile.cmd
31
32ROOT_EFT_ROOT=	$(ROOT)/usr/lib/fm/eft
33ROOT_COMMON_EFT_FILES= $(EFT_COMMON_FILES:%=$(ROOT_EFT_ROOT)/%)
34USR_PLAT_FM_DIR= $(ROOT)/usr/platform/$(EFT_PLAT)/lib/fm
35USR_PLAT_EFT_DIR= $(USR_PLAT_FM_DIR)/eft
36USR_PLAT_EFT_FILES= $(EFT_PLAT_FILES:%=$(USR_PLAT_EFT_DIR)/%)
37
38#
39# Override the built-in ESC pre-processor with a reference to the one we
40# have set in Makefile.master. This ensures that we use the same cpp
41# throughout the build.
42#
43ESC_ENV=_ESC_CPP=$(CPP)
44
45#
46# Default target - specify before including Makefile.rootdirs which would
47# otherwise provide a default
48#
49install: all
50
51include $(SRC)/cmd/fm/eversholt/Makefile.rootdirs
52
53all:= FILEMODE =	0444
54
55all: $(ROOT_EFT_ROOT) $(USR_PLAT_EFT_FILES) $(ROOT_COMMON_EFT_FILES)
56
57install_h lint _msg:
58
59clean clobber:
60	$(RM) $(EFT_PLAT_FILES) $(EFT_COMMON_FILES) \
61	$(USR_PLAT_EFT_FILES) $(ROOT_COMMON_EFT_FILES)
62
63ESCFLAGS= -D_ESC -I$(ROOT)/usr/include
64pciexrc.eft := ESCFLAGS += -I$(SRC)/uts/sun4v/io/px
65
66%.eft: ../common/%.esc
67	$(ESC_ENV) $(ESC) $(ESCFLAGS) -o $@ $<
68
69%.eft: %.esc
70	$(ESC_ENV) $(ESC) $(ESCFLAGS) -o $@ $<
71