xref: /titanic_52/usr/src/lib/efcode/Makefile.efcode (revision bdfc6d18da790deeec2e0eb09c625902defe2498)
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# Common build rules for efcode shared objects.
29#
30# For historical reasons, these shared objects aren't explicitly versioned, so
31# turn off VERS and LIBLINKS (VERS must be cleared before the inclusion of
32# Makefile.lib, and LIBLINKS must be cleared afterwards).  Also, because of
33# the weird alternate naming scheme, we must define our own symlink macros.
34#
35
36VERS	=
37
38include $(SRC)/lib/Makefile.lib
39
40LIBS	= $(DYNLIB)
41LDLIBS	+= -lc
42LIBLINKS =
43
44CPPFLAGS += -DDEBUG -DFCODE_INTERNAL
45CPPFLAGS += -I $(SRC)/lib/efcode/include -I $(ROOT)/usr/platform/sun4u/include
46DYNFLAGS += -R\$$ORIGIN
47
48SRCDIR = ..
49EFCODE64DIR = /usr/lib/efcode/$(MACH64)
50ROOTLIBDIR = $(ROOT)/usr/lib/efcode
51ROOTLIBDIR64 = $(ROOT)/usr/lib/efcode/$(MACH64)
52ROOTSYMLINKS64 = $(SYMLINKS:%=$(ROOTLIBDIR64)/%)
53
54#
55# Since a number of efcode shared objects depend on fcode.so, fcdriver.so, and
56# fcpackage.so, provide macros that expand to their full paths.
57#
58FCODE64 = $(ROOTLIBDIR64)/fcode.so
59FCDRIVER64 = $(ROOTLIBDIR64)/fcdriver.so
60FCPACKAGE64 = $(ROOTLIBDIR64)/fcpackage.so
61
62.KEEP_STATE:
63
64all: $(LIBS)
65
66lint: lintcheck
67
68$(ROOTSYMLINKS64): $(ROOTLIBDIR64)/$(DYNLIB)
69	-$(RM) $@; $(SYMLINK) $(DYNLIB) $@
70
71include $(SRC)/lib/Makefile.targ
72