10Sstevel@tonic-gate# 20Sstevel@tonic-gate# CDDL HEADER START 30Sstevel@tonic-gate# 40Sstevel@tonic-gate# The contents of this file are subject to the terms of the 52522Sraf# Common Development and Distribution License (the "License"). 62522Sraf# You may not use this file except in compliance with the License. 70Sstevel@tonic-gate# 80Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate# See the License for the specific language governing permissions 110Sstevel@tonic-gate# and limitations under the License. 120Sstevel@tonic-gate# 130Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate# 190Sstevel@tonic-gate# CDDL HEADER END 200Sstevel@tonic-gate# 210Sstevel@tonic-gate# 22*5905Srie# Copyright 2008 Sun Microsystems, Inc. All rights reserved. 230Sstevel@tonic-gate# Use is subject to license terms. 240Sstevel@tonic-gate# 252522Sraf# ident "%Z%%M% %I% %E% SMI" 260Sstevel@tonic-gate# 270Sstevel@tonic-gate 280Sstevel@tonic-gate# When building libperl.so, hidden command and dependency checking is OK. 290Sstevel@tonic-gate.KEEP_STATE: 300Sstevel@tonic-gate 310Sstevel@tonic-gate# Library and version. 320Sstevel@tonic-gateLIBRARY = libperl.a 330Sstevel@tonic-gateVERS = .1 340Sstevel@tonic-gate 350Sstevel@tonic-gate# Objects comprising libperl. 360Sstevel@tonic-gateOBJECTS = \ 370Sstevel@tonic-gate av.o \ 380Sstevel@tonic-gate deb.o \ 390Sstevel@tonic-gate doio.o \ 400Sstevel@tonic-gate doop.o \ 410Sstevel@tonic-gate dump.o \ 420Sstevel@tonic-gate globals.o \ 430Sstevel@tonic-gate gv.o \ 440Sstevel@tonic-gate hv.o \ 450Sstevel@tonic-gate locale.o \ 460Sstevel@tonic-gate mg.o \ 470Sstevel@tonic-gate numeric.o \ 480Sstevel@tonic-gate op.o \ 490Sstevel@tonic-gate pad.o \ 500Sstevel@tonic-gate perl.o \ 510Sstevel@tonic-gate perlapi.o \ 520Sstevel@tonic-gate perlio.o \ 530Sstevel@tonic-gate perly.o \ 540Sstevel@tonic-gate pp.o \ 550Sstevel@tonic-gate pp_ctl.o \ 560Sstevel@tonic-gate pp_hot.o \ 570Sstevel@tonic-gate pp_pack.o \ 580Sstevel@tonic-gate pp_sort.o \ 590Sstevel@tonic-gate pp_sys.o \ 600Sstevel@tonic-gate reentr.o \ 610Sstevel@tonic-gate regcomp.o \ 620Sstevel@tonic-gate regexec.o \ 630Sstevel@tonic-gate run.o \ 640Sstevel@tonic-gate scope.o \ 650Sstevel@tonic-gate sv.o \ 660Sstevel@tonic-gate taint.o \ 670Sstevel@tonic-gate toke.o \ 680Sstevel@tonic-gate universal.o \ 690Sstevel@tonic-gate utf8.o \ 700Sstevel@tonic-gate util.o \ 710Sstevel@tonic-gate xsutils.o 720Sstevel@tonic-gate 730Sstevel@tonic-gate# 740Sstevel@tonic-gate# Some of the Makefile.master and Makefile.lib flags are overridden by 750Sstevel@tonic-gate# ../Makefile.perlcfg which is in turn generated from config.sh by 760Sstevel@tonic-gate# ../extract_config.sh - check there first before overriding anything in this 770Sstevel@tonic-gate# Makefile. 780Sstevel@tonic-gate# 790Sstevel@tonic-gateinclude ../../../../lib/Makefile.lib 800Sstevel@tonic-gateinclude ../Makefile.perlcfg 810Sstevel@tonic-gate 822522Sraf# There should be a mapfile here 832522SrafMAPFILES = 842522Sraf 85*5905Srie# Disable perl from directly binding to itself, but allow perl to directly bind 86*5905Srie# to its dependencies (ie. map -Bdirect -> -zdirect). Ensure lazy loading is 87*5905Srie# established (which is enabled automatically with -Bdirect). 88*5905SrieBDIRECT = $(ZDIRECT) 89*5905SrieLDFLAGS += $(ZLAZYLOAD) 90*5905Srie 910Sstevel@tonic-gate# Add in the perl-specific flags (including largefile flags). 920Sstevel@tonic-gateCPPFLAGS += $(PERL_COREFLAGS) $(PERL_LFFLAGS) 930Sstevel@tonic-gate 940Sstevel@tonic-gate# A static version of libperl isn't needed. 950Sstevel@tonic-gateLIBS = $(DYNLIB) 960Sstevel@tonic-gate 970Sstevel@tonic-gate# libperl.so lives under the perl install tree, not /usr/lib. 980Sstevel@tonic-gateROOTLIBDIR = $(PERL_CORE_DIR) 990Sstevel@tonic-gate 1000Sstevel@tonic-gate# Add in the libraries perl needs to be linked against. 1010Sstevel@tonic-gateLDLIBS += $(PERL_LDLIBS) 1020Sstevel@tonic-gate 1030Sstevel@tonic-gateall: $(LIBS) $(LIBLINKS) 1040Sstevel@tonic-gate 1050Sstevel@tonic-gate# 1060Sstevel@tonic-gate# libperl is installed by the installperl script, which is in turn called by 1070Sstevel@tonic-gate# distrib/Makefile, so this target does nothing. However, installperl doesn't 1080Sstevel@tonic-gate# get the links to libperl.so quite right, so this is fixed up by the 1090Sstevel@tonic-gate# install_lib target, which is run by distrib/Makefile (see below). 1100Sstevel@tonic-gate# 1110Sstevel@tonic-gateinstall: all 1120Sstevel@tonic-gate 1130Sstevel@tonic-gate# 1140Sstevel@tonic-gate# By default perl only installs libperl.so, wheras ON would install 1150Sstevel@tonic-gate# libperl.so.1 and then create libperl.so as a symlink to libperl.so.1. 1160Sstevel@tonic-gate# The following two rules fix up things so they follow the ON conventions. 1170Sstevel@tonic-gate# 1180Sstevel@tonic-gateinstall_lib: 1190Sstevel@tonic-gate $(RM) -f $(PERL_CORE_DIR)/$(DYNLIB) 1200Sstevel@tonic-gate $(MV) $(PERL_CORE_DIR)/$(LIBLINKS) $(PERL_CORE_DIR)/$(DYNLIB) 1210Sstevel@tonic-gate $(LN) -s ./$(DYNLIB) $(PERL_CORE_DIR)/$(LIBLINKS) 1220Sstevel@tonic-gate 1230Sstevel@tonic-gate$(LIBLINKS): 1240Sstevel@tonic-gate $(RM) -f $@ 1250Sstevel@tonic-gate $(LN) -s ./$(DYNLIB) $@ 1260Sstevel@tonic-gate 1270Sstevel@tonic-gateinclude ../../../../lib/Makefile.targ 128