-install_name \$(shrpdir)/\$@"
;;
cygwin*)
- linklibperl="-lperl"
+ shrpldflags="$shrpldflags -Wl,--out-implib=libperl.dll.a -Wl,--image-base,0x52000000"
+ linklibperl="-L. -lperl"
;;
sunos*)
linklibperl="-lperl"
perlmain.c: miniperlmain.c config.sh $(FIRSTMAKEFILE)
sh writemain $(DYNALOADER) $(static_ext) > perlmain.c
-!NO!SUBS!
-case "$osname" in
-cygwin)
- ;; # Let cygwin/Makefile.SHs do its work.
-*)
- $spitshell >>Makefile <<'!NO!SUBS!'
perlmain$(OBJ_EXT): perlmain.c
$(CCCMD) $(PLDLFLAGS) $*.c
-!NO!SUBS!
- ;;
-esac
-$spitshell >>Makefile <<'!NO!SUBS!'
# The file ext.libs is a list of libraries that must be linked in
# for static extensions, e.g. -lm -lgdbm, etc. The individual
# static extension Makefile's add to it.
!NO!SUBS!
;;
+cygwin)
+ $spitshell >>Makefile <<'!NO!SUBS!'
+cygwin.c: cygwin/cygwin.c
+ $(LNS) cygwin/cygwin.c
+
+LIBPERL_NONSHR = libperl$(LIB_EXT)
+
+$(LIBPERL_NONSHR): $(obj)
+ $(RMS) $(LIBPERL_NONSHR)
+ $(AR) rcu $(LIBPERL_NONSHR) $(obj)
+
+!NO!SUBS!
+ ;;
esac
-if test -r $Makefile_s ; then
+if test -s $Makefile_s ; then
. $Makefile_s
$spitshell >>Makefile <<!GROK!THIS!
-rmdir lib/threads lib/XS
-rmdir lib/CPANPLUS/Dist/Build/t/dummy-*
-rmdir lib/CPANPLUS/t/dummy-cpanplus lib/CPANPLUS/t/dummy-localmirror
- -rm -f cygcrypt-0.dll cygwin1.dll
-rm -f lib/ExtUtils/CBuilder/t/libcompilet.dll.a
-rm -f lib/ExtUtils/ParseXS/t/libXSTest.dll.a
+++ /dev/null
-# This file is read by Makefile.SH to produce rules for $(LIBPERL) (and
-# some additional rules as well).
-
-# Rerun `sh Makefile.SH; make depend' after making any change.
-
-# Additional rules supported: libperl.a (for static linking),
-# ld2 and perlld removed
-#
-
-#! /bin/sh
-case $PERL_CONFIG_SH in
-'')
- if test -f config.sh; then TOP=.;
- elif test -f ../config.sh; then TOP=..;
- elif test -f ../../config.sh; then TOP=../..;
- elif test -f ../../../config.sh; then TOP=../../..;
- elif test -f ../../../../config.sh; then TOP=../../../..;
- else
- echo "Can't find config.sh."; exit 1
- fi
- . $TOP/config.sh
- ;;
-esac
-
-addtopath=`pwd | sed -e 's/ /\\\ /g'`
-$spitshell >>Makefile <<!GROK!THIS!
-
-cygwin.c: cygwin/cygwin.c
- \$(LNS) cygwin/cygwin.c
-
-!GROK!THIS!
-
-# make sure that all library names are not malformed
-libperl=`echo $libperl|sed -e s,\\\..*,,`
-linklibperl=-l`echo $libperl|sed -e s,^lib,,`
-vers=`echo $version|tr '.' '_'`
-dllname=`echo $libperl|sed -e s,^lib,cyg,``echo $vers|sed -e s,_[0-9]$,,`
-# append "d" suffix to -DDEBUGGING build: cygperl5_10d.dll
-case $config_args in
- *DEBUGGING*)
- dllname="${dllname}"d
- ;;
-esac
-# added -mms-bitfields to be able to link to MSVC win32 bitfields libs
-# (4 byte instead of 2 byte alignment)
-
-$spitshell >>Makefile <<!GROK!THIS!
-LIBPERL = $libperl
-LLIBPERL= $linklibperl
-DLLNAME= $dllname
-CLDFLAGS= -L$addtopath $ldflags
-LDDLFLAGS = --shared -L$addtopath $ldflags
-CCFLAGS=$ccflags -mms-bitfields
-PLDLFLAGS =
-CAT = $cat
-AWK = $awk
-!GROK!THIS!
-
-case "$useshrplib" in
-true)
- $spitshell >>Makefile <<'!NO!SUBS!'
-cwobj = $(obj)
-
-# override default rule (NB: make croaks!) to force dll usage
-perlmain$(OBJ_EXT): perlmain.c
- $(CCCMD) $(PLDLFLAGS) -DUSEIMPORTLIB $*.c
-
-# library used to make statically linked executables
-# miniperl is linked against it to avoid libperl.dll locking
-$(LIBPERL)$(LIB_EXT): $& $(cwobj)
- $(AR) rcu $@ $(cwobj)
-
-# dll and import library
-$(LIBPERL).dll$(LIB_EXT): $& $(cwobj)
- $(LDLIBPTH) $(CC) $(SHRPLDFLAGS) -o $(DLLNAME)$(DLSUFFIX) -Wl,--out-implib=$@ \
- $(cwobj) $(libs)
-
-# How to build executables.
-
-# The miniperl -w -MExporter line is a basic cheap test to catch errors
-# before make goes on to run preplibrary and then MakeMaker on extensions.
-# This is very handy because later errors are often caused by miniperl
-# build problems but that's not obvious to the novice.
-# The Module used here must not depend on Config or any extensions.
-
-miniperl.exe \
-miniperl: $& miniperlmain$(OBJ_EXT) $(LIBPERL)$(LIB_EXT) opmini$(OBJ_EXT)
- $(LDLIBPTH) $(CC) $(CLDFLAGS) -o miniperl miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) $(LIBPERL)$(LIB_EXT) $(libs)
- $(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
-
-perl.exe \
-perl: $& perlmain$(OBJ_EXT) $(LIBPERL).dll$(LIB_EXT) $(DYNALOADER) $(static_ext) ext.libs
- $(SHRPENV) $(LDLIBPTH) $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o perl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
-
-pureperl: $& perlmain$(OBJ_EXT) $(LIBPERL).dll$(LIB_EXT) $(DYNALOADER) $(static_ext) ext.libs
- $(SHRPENV) $(LDLIBPTH) purify $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o pureperl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
-
-purecovperl: $& perlmain$(OBJ_EXT) $(LIBPERL).dll$(LIB_EXT) $(DYNALOADER) $(static_ext) ext.libs
- $(SHRPENV) $(LDLIBPTH) purecov $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o purecovperl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
-
-quantperl: $& perlmain$(OBJ_EXT) $(LIBPERL).dll$(LIB_EXT) $(DYNALOADER) $(static_ext) ext.libs
- $(SHRPENV) $(LDLIBPTH) quantify $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o quantperl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
-
-!NO!SUBS!
- ;;
-*)
-$spitshell >>Makefile <<'!NO!SUBS!'
-cwobj = $(obj)
-
-# perl library
-$(LIBPERL)$(LIB_EXT): $& $(cwobj)
- $(AR) rcu $@ $(cwobj)
-
-# How to build executables.
-
-# The miniperl -w -MExporter line is a basic cheap test to catch errors
-# before make goes on to run preplibrary and then MakeMaker on extensions.
-# This is very handy because later errors are often caused by miniperl
-# build problems but that's not obvious to the novice.
-# The Module used here must not depend on Config or any extensions.
-
-miniperl.exe \
-miniperl: $& miniperlmain$(OBJ_EXT) $(LIBPERL)$(LIB_EXT) opmini$(OBJ_EXT)
- $(LDLIBPTH) $(CC) $(CLDFLAGS) -o miniperl miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) $(LLIBPERL) $(libs)
- $(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
-
-perl.exe \
-perl: $& perlmain$(OBJ_EXT) $(LIBPERL)$(LIB_EXT) $(DYNALOADER) $(static_ext) ext.libs
- $(SHRPENV) $(LDLIBPTH) $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o perl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) -Wl,-Bstatic $(LLIBPERL) -Wl,-Bdynamic `cat ext.libs` $(libs)
-
-pureperl: $& perlmain$(OBJ_EXT) $(LIBPERL)$(LIB_EXT) $(DYNALOADER) $(static_ext) ext.libs
- $(SHRPENV) $(LDLIBPTH) purify $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o pureperl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
-
-purecovperl: $& perlmain$(OBJ_EXT) $(LIBPERL)$(LIB_EXT) $(DYNALOADER) $(static_ext) ext.libs
- $(SHRPENV) $(LDLIBPTH) purecov $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o purecovperl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
-
-quantperl: $& perlmain$(OBJ_EXT) $(LIBPERL)$(LIB_EXT) $(DYNALOADER) $(static_ext) ext.libs
- $(SHRPENV) $(LDLIBPTH) quantify $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o quantperl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
-
-!NO!SUBS!
- ;;
-esac
-
-# libperl.a is _the_ library both in dll and static cases
-# $(LIBPERL)$(LIB_EXT) expands to this name dependless of build model
-#
-# NOTE: The "-Wl,-Bstatic $(LLIBPERL) -Wl,-Bdynamic" is required to give
-# the import library linking priority over the dynamic library, since both
-# the .dll and .a are in the same directory. When the new standard for
-# naming import/dynamic/static libraries emerges this should be updated.
-#
-$spitshell >>Makefile <<'!NO!SUBS!'
-
-
-!NO!SUBS!
-
-# suid perl is removed - i've never seen suid scripts for win32
-
-##############################################
-# additional targets
-
-$spitshell >>Makefile <<'!NO!SUBS!'
-
-DIST_DIRECTORY = .dist
-
-distdir: miniperl
- -mkdir $(DIST_DIRECTORY)
- ./miniperl -Ilib '-MExtUtils::Manifest' \
- -e "ExtUtils::Manifest::manicopy(ExtUtils::Manifest::maniread(),'$(DIST_DIRECTORY)')"
-
-test_prep:
-
-!NO!SUBS!