From: Perl 5 Porters Date: Tue, 18 Jun 1996 08:42:20 +0000 (+0000) Subject: perl 5.003_01: os2/Makefile.SHs X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e95c8f0e5d8be32cbf04f7f6d772dbcb1172f10c;p=p5sagit%2Fp5-mst-13.2.git perl 5.003_01: os2/Makefile.SHs Add a.out support Update library and dynamic loading support --- diff --git a/os2/Makefile.SHs b/os2/Makefile.SHs index bc99fd1..83227bb 100644 --- a/os2/Makefile.SHs +++ b/os2/Makefile.SHs @@ -1,5 +1,21 @@ -# This file is read by Makefile.SH to produce rules for $(perllib) -# We insert perl5.def since I do not know how to generate it yet. +# This file is read by Makefile.SH to produce rules for $(perllib) (and +# some additional rules as well). + +# Rerun `sh Makefile.SH; make depend' after making any change. + +# Additional rules supported: perl_, aout_test, aout_install, use them +# for a.out style perl (which may fork). + +$spitshell >>Makefile <>Makefile <<'!NO!SUBS!' $(perllib): perl.imp perl.dll perl5.def @@ -9,7 +25,7 @@ perl.imp: perl5.def emximp -o perl.imp perl5.def perl.dll: $(obj) perl5.def perl$(OBJ_EXT) - $(LD) $(LDDLFLAGS) -o $@ perl$(OBJ_EXT) $(obj) -lsocket perl5.def + $(LD) $(LDDLFLAGS) -o $@ perl$(OBJ_EXT) $(obj) $(libs) perl5.def perl5.def: perl.linkexp echo "LIBRARY 'Perl' INITINSTANCE TERMINSTANCE" > $@ @@ -19,8 +35,12 @@ perl5.def: perl.linkexp echo DATA LOADONCALL NONSHARED MULTIPLE >>$@ echo EXPORTS >>$@ echo ' "ctermid"' >>$@ + echo ' "get_sysinfo"' >>$@ echo ' "Perl_OS2_init"' >>$@ echo ' "OS2_Perl_data"' >>$@ + echo ' "dlopen"' >>$@ + echo ' "dlsym"' >>$@ + echo ' "dlerror"' >>$@ !NO!SUBS! if [ ! -z "$myttyname" ] ; then @@ -49,11 +69,11 @@ perl.linkexp: perl.exports perl.map cat perl.exports perl.map | sort | uniq -d | sed -e 's/\w\+/ "\0"/' > perl.linkexp perl.map: $(obj) perl$(OBJ_EXT) miniperlmain$(OBJ_EXT) - $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o dummy.exe miniperlmain$(OBJ_EXT) perl$(OBJ_EXT) $(obj) -lsocket -lm -Zmap -Zlinker /map + $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o dummy.exe miniperlmain$(OBJ_EXT) perl$(OBJ_EXT) $(obj) $(libs) -Zmap -Zlinker /map awk '{if ($$3 == "") print $$2}' perl.map rm dummy.exe dummy.map -depend: os2ish.h +depend: os2ish.h dlfcn.h # Stupid make? Needed... os2$(OBJ_EXT) : os2.c @@ -61,11 +81,60 @@ os2$(OBJ_EXT) : os2.c os2.c: os2/os2.c os2ish.h cp $< $@ +dl_os2.c: os2/dl_os2.c os2ish.h + cp $< $@ + os2ish.h: os2/os2ish.h cp $< $@ +dlfcn.h: os2/dlfcn.h + cp $< $@ + + installcmd : perl -e 'die qq{Give the option INSTALLCMDDIR=... to make!} if $$ARGV[0] eq ""' $(INSTALLCMDDIR) perl os2/perl2cmd.pl $(INSTALLCMDDIR) +# Aout section: + +aout_obj = $(addsuffix $(AOUT_OBJ_EXT),$(basename $(obj))) +AOUT_DYNALOADER = $(addsuffix $(AOUT_LIB_EXT),$(basename $(DYNALOADER))) +aout_static_ext = $(addsuffix $(AOUT_LIB_EXT),$(basename $(dynamic_ext))) +aout_static_lib = $(addsuffix $(LIB_EXT),$(basename $(dynamic_ext))) + +$(aout_perllib) : $(aout_obj) perl$(AOUT_OBJ_EXT) + rm -f $(perllib) + $(AOUT_AR) rcu $(aout_perllib) perl$(AOUT_OBJ_EXT) $(aout_obj) + +.c$(AOUT_OBJ_EXT): + $(AOUT_CCCMD) $(PLDLFLAGS) -c $*.c + +aout_perlmain.c: miniperlmain.c config.sh makefile $(static_ext_autoinit) + sh writemain $(DYNALOADER) $(aout_static_lib) > tmp + sh mv-if-diff tmp aout_perlmain.c + +miniperl_: $& miniperlmain$(AOUT_OBJ_EXT) $(aout_perllib) ext.libs + $(CC) $(LARGE) $(AOUT_CLDFLAGS) $(CCDLFLAGS) -o miniperl_ miniperlmain$(AOUT_OBJ_EXT) $(aout_perllib) `cat ext.libs` $(libs) + +perl_: $& aout_perlmain$(AOUT_OBJ_EXT) $(aout_perllib) $(AOUT_DYNALOADER) $(aout_static_ext) ext.libs + $(CC) $(LARGE) $(AOUT_CLDFLAGS) $(CCDLFLAGS) -o perl_ aout_perlmain$(AOUT_OBJ_EXT) $(AOUT_DYNALOADER) $(aout_static_ext) $(aout_perllib) `cat ext.libs` $(libs) + +aout_clean: + -rm *perl_.* *.o *.a lib/auto/*/*.a ext/*/Makefile.aout + +aout_install: perl_ aout_install.perl + +aout_install.perl: perl_ installperl + ./perl_ installperl + +aout_test: perl_ + - cd t && (rm -f perl_$(EXE_EXT); $(LNS) ../perl_$(EXE_EXT) perl_$(EXE_EXT)) && ./perl_ TEST