Home | History | Annotate | Download | only in distrib
      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 2008 Sun Microsystems, Inc.  All rights reserved.
     23 # Use is subject to license terms.
     24 #
     25 # ident	"%Z%%M%	%I%	%E% SMI"
     26 #
     27 
     28 # When building libperl.so, hidden command and dependency checking is OK.
     29 .KEEP_STATE:
     30 
     31 # Library and version.
     32 LIBRARY = 	libperl.a
     33 VERS =		.1
     34 
     35 # Objects comprising libperl.
     36 OBJECTS = \
     37     av.o \
     38     deb.o \
     39     doio.o \
     40     doop.o \
     41     dump.o \
     42     globals.o \
     43     gv.o \
     44     hv.o \
     45     locale.o \
     46     mg.o \
     47     numeric.o \
     48     op.o \
     49     pad.o \
     50     perl.o \
     51     perlapi.o \
     52     perlio.o \
     53     perly.o \
     54     pp.o \
     55     pp_ctl.o \
     56     pp_hot.o \
     57     pp_pack.o \
     58     pp_sort.o \
     59     pp_sys.o \
     60     reentr.o \
     61     regcomp.o \
     62     regexec.o \
     63     run.o \
     64     scope.o \
     65     sv.o \
     66     taint.o \
     67     toke.o \
     68     universal.o \
     69     utf8.o \
     70     util.o \
     71     xsutils.o
     72 
     73 #
     74 # Some	of the Makefile.master and Makefile.lib flags are overridden by
     75 # ../Makefile.perlcfg which is in turn generated from config.sh by
     76 # ../extract_config.sh - check there first before overriding anything in this
     77 # Makefile.
     78 #
     79 include ../../../../lib/Makefile.lib
     80 include ../Makefile.perlcfg
     81 
     82 # There should be a mapfile here
     83 MAPFILES =
     84 
     85 # Disable perl from directly binding to itself, but allow perl to directly bind
     86 # to its dependencies (ie. map -Bdirect -> -zdirect).  Ensure lazy loading is
     87 # established (which is enabled automatically with -Bdirect).
     88 BDIRECT =	$(ZDIRECT)
     89 LDFLAGS +=	$(ZLAZYLOAD)
     90 
     91 # Add in the perl-specific flags (including largefile flags).
     92 CPPFLAGS += $(PERL_COREFLAGS) $(PERL_LFFLAGS)
     93 
     94 # A static version of libperl isn't needed.
     95 LIBS = $(DYNLIB)
     96 
     97 # libperl.so lives under the perl install tree, not /usr/lib.
     98 ROOTLIBDIR = $(PERL_CORE_DIR)
     99 
    100 # Add in the libraries perl needs to be linked against.
    101 LDLIBS += $(PERL_LDLIBS)
    102 
    103 all: $(LIBS) $(LIBLINKS)
    104 
    105 #
    106 # libperl is installed by the installperl script, which is in turn called by
    107 # distrib/Makefile, so this target does nothing.  However, installperl doesn't
    108 # get the links to libperl.so quite right, so this is fixed up by the
    109 # install_lib target, which is run by distrib/Makefile (see below).
    110 #
    111 install: all
    112 
    113 #
    114 # By default perl only installs libperl.so, wheras ON would install
    115 # libperl.so.1 and then create libperl.so as a symlink to libperl.so.1.
    116 # The following two rules fix up things so they follow the ON conventions.
    117 #
    118 install_lib:
    119 	$(RM) -f $(PERL_CORE_DIR)/$(DYNLIB)
    120 	$(MV) $(PERL_CORE_DIR)/$(LIBLINKS) $(PERL_CORE_DIR)/$(DYNLIB)
    121 	$(LN) -s ./$(DYNLIB) $(PERL_CORE_DIR)/$(LIBLINKS)
    122 
    123 $(LIBLINKS):
    124 	$(RM) -f $@
    125 	$(LN) -s ./$(DYNLIB) $@
    126 
    127 include ../../../../lib/Makefile.targ
    128