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