diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-01-31 20:16:43 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-01-31 20:16:43 +0000 |
commit | 07f3cc2a611daebb9d83f869d36ef63cf4fa2565 (patch) | |
tree | f86a1dd6458958491c2c86ad4ad6119e77f48946 /Makefile.SH | |
parent | fc6784129696c3d1b807ce356dbd42133b41d86a (diff) | |
download | perl-07f3cc2a611daebb9d83f869d36ef63cf4fa2565.tar.gz |
Move the static/dynamic/nonxs LINKTYPE logic from make_ext.pl to Makefile.SH
This simplifies make_ext.pl considerably. Given that the first use of 'passthru'
was in 40000a8c37c35cc00114329ca0add46bca36a0ec in 1995, possibly we should have
done this particular refactoring a little while ago.
Diffstat (limited to 'Makefile.SH')
-rw-r--r-- | Makefile.SH | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Makefile.SH b/Makefile.SH index 2e82a8e2f6..f8193a6fe1 100644 --- a/Makefile.SH +++ b/Makefile.SH @@ -59,7 +59,7 @@ true) esac pldlflags="$cccdlflags" - static_target='static_pic' + static_ldflags='' case "${osname}${osvers}" in next4*) ld=libtool @@ -175,7 +175,7 @@ EOT ;; *) pldlflags='' - static_target='static' + static_ldflags='CCCDLFLAGS=' ;; esac @@ -272,8 +272,8 @@ SHRPENV = $shrpenv # if building a shared libperl.so that might later be linked into # another application, then it might be appropriate to also build static # extensions (usually just DynaLoader) with relocatable code (e.g. -fPIC -# for GNU cc). This is handled by make_ext.pl. -STATIC = $static_target +# for GNU cc). +STATIC_LDFLAGS = $static_ldflags # The following is used to include the current directory in # the dynamic loader path you are building a shared libperl. @@ -1123,16 +1123,16 @@ manicheck: FORCE # DynaLoader may be needed for extensions that use Makefile.PL. $(DYNALOADER): miniperl$(EXE_EXT) preplibrary FORCE - $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib make_ext.pl --target=$(STATIC) $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL) + $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib make_ext.pl $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL) LINKTYPE=static $(STATIC_LDFLAGS) d_dummy $(dynamic_ext): miniperl$(EXE_EXT) preplibrary makeppport $(DYNALOADER) FORCE - $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib make_ext.pl --target=dynamic $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL) + $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib make_ext.pl $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL) LINKTYPE=dynamic s_dummy $(static_ext): miniperl$(EXE_EXT) preplibrary makeppport $(DYNALOADER) FORCE - $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib make_ext.pl --target=$(STATIC) $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL) + $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib make_ext.pl $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL) LINKTYPE=static $(STATIC_LDFLAGS) n_dummy $(nonxs_ext): miniperl$(EXE_EXT) preplibrary FORCE - $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib make_ext.pl --target=nonxs $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL) + $(LDLIBPTH) $(RUN) ./miniperl$(EXE_EXT) -Ilib make_ext.pl $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL) !NO!SUBS! $spitshell >>$Makefile <<EOF |