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