#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
#
# When building libperl.so, hidden command and dependency checking is OK.
.KEEP_STATE:
# Library and version.
LIBRARY = libperl.a
VERS = .1
# Objects comprising libperl.
OBJECTS = \
av.o \
deb.o \
doio.o \
doop.o \
dump.o \
gv.o \
hv.o \
locale.o \
mg.o \
op.o \
pad.o \
perl.o \
perlio.o \
perly.o \
pp.o \
pp_ctl.o \
pp_hot.o \
pp_sys.o \
reentr.o \
run.o \
scope.o \
sv.o \
taint.o \
toke.o \
utf8.o \
util.o \
#
# Some of the Makefile.master and Makefile.lib flags are overridden by
# ../Makefile.perlcfg which is in turn generated from config.sh by
# ../extract_config.sh - check there first before overriding anything in this
# Makefile.
#
include ../../../../lib/Makefile.lib
include ../Makefile.perlcfg
# There should be a mapfile here
MAPFILES =
# Disable perl from directly binding to itself, but allow perl to directly bind
# to its dependencies (ie. map -Bdirect -> -zdirect). Ensure lazy loading is
# established (which is enabled automatically with -Bdirect).
BDIRECT = $(ZDIRECT)
LDFLAGS += $(ZLAZYLOAD)
# Exclude lazy loading guidance messages
ZGUIDANCE = $(ZGUIDANCE_NOLAZYLOAD)
# Add in the perl-specific flags (including largefile flags).
CPPFLAGS += $(PERL_COREFLAGS) $(PERL_LFFLAGS)
# A static version of libperl isn't needed.
LIBS = $(DYNLIB)
# libperl.so lives under the perl install tree, not /usr/lib.
INSTALL_LIBDIR= $(PERL_CORE_DIR:$(ROOT)/%=%)
# Add in the libraries perl needs to be linked against.
LDLIBS += $(PERL_LDLIBS)
# The following objects are unused. Refer to comments in Makefile.master.
UNUSEDOBJS = perlapi.o
UNUSEDFILES = $(UNUSEDOBJS:%.o=./%.c)
POST_PROCESS_SO += $(ACCESS_UNUSEDFILES)
all: $(LIBS) $(LIBLINKS)
#
# libperl is installed by the installperl script, which is in turn called by
# distrib/Makefile, so this target does nothing. However, installperl doesn't
# get the links to libperl.so quite right, so this is fixed up by the
# install_lib target, which is run by distrib/Makefile (see below).
#
install: all
#
# By default perl only installs libperl.so, wheras ON would install
# The following two rules fix up things so they follow the ON conventions.
#
install_lib:
$(RM) -f $(PERL_CORE_DIR)/$(DYNLIB)
$(MV) $(PERL_CORE_DIR)/$(LIBLINKS) $(PERL_CORE_DIR)/$(DYNLIB)
$(LN) -s ./$(DYNLIB) $(PERL_CORE_DIR)/$(LIBLINKS)
$(LIBLINKS):
$(RM) -f $@
$(LN) -s ./$(DYNLIB) $@
include ../../../../lib/Makefile.targ