summaryrefslogtreecommitdiff
path: root/os2/Makefile.SHs
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters.nicoh.com>1995-12-26 06:55:30 +0000
committerAndy Dougherty <doughera.lafayette.edu>1995-12-26 06:55:30 +0000
commit82835e01f42cf6e6ec087b39a902865e24e1b401 (patch)
tree07b97c483a008634feaa84e6a4001e712f1d077f /os2/Makefile.SHs
parent28e44ed9749d8684067f67623a63b70fce87c3b8 (diff)
downloadperl-82835e01f42cf6e6ec087b39a902865e24e1b401.tar.gz
New file.
Diffstat (limited to 'os2/Makefile.SHs')
-rw-r--r--os2/Makefile.SHs69
1 files changed, 69 insertions, 0 deletions
diff --git a/os2/Makefile.SHs b/os2/Makefile.SHs
new file mode 100644
index 0000000000..35a9f17278
--- /dev/null
+++ b/os2/Makefile.SHs
@@ -0,0 +1,69 @@
+# 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.
+
+$spitshell >>Makefile <<'!NO!SUBS!'
+$(perllib): perl.imp perl.dll perl5.def
+ emximp -o $(perllib) perl.imp
+
+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
+
+perl5.def: perl.linkexp
+ echo "LIBRARY 'Perl' INITINSTANCE TERMINSTANCE" > $@
+ echo DESCRIPTION "'Perl interpreter, export autogenerated'" >>$@
+ echo STACKSIZE 32768 >>$@
+ echo CODE LOADONCALL >>$@
+ echo DATA LOADONCALL NONSHARED MULTIPLE >>$@
+ echo EXPORTS >>$@
+ echo ' "ctermid"' >>$@
+!NO!SUBS!
+
+if [ ! -z "$myttyname" ] ; then
+ $spitshell >>Makefile <<'!NO!SUBS!'
+ echo ' "ttyname"' >>$@
+!NO!SUBS!
+fi
+
+$spitshell >>Makefile <<'!NO!SUBS!'
+ cat perl.linkexp >>$@
+
+# grep -v '"\(malloc\|realloc\|free\)"' perl.linkexp >>$@
+
+
+# We assume here that perl is available somewhere ...
+
+perl.exports: perl.exp EXTERN.h perl.h
+ (echo '#include "EXTERN.h"'; echo '#include "perl.h"' ; \
+ echo '#include "perl.exp"') | \
+ $(CC) -DEMBED -E - | \
+ awk '{if ($$2 == "") print $$1}' | sort | uniq > $@
+
+# perl -ne 'print if (/^#!/ .. /^#\s/) && s/^(\w+) *$$/$$1/' > $@
+
+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
+ awk '{if ($$3 == "") print $$2}' <dummy.map | sort | uniq > perl.map
+ rm dummy.exe dummy.map
+
+depend: os2ish.h
+
+# Stupid make? Needed...
+os2$(OBJ_EXT) : os2.c
+
+os2.c: os2/os2.c os2ish.h
+ cp $< $@
+
+os2ish.h: os2/os2ish.h
+ cp $< $@
+
+installcmd :
+ perl -e 'die qq{Give the option INSTALLCMDDIR=... to make!} if $$ARGV[0] eq ""' $(INSTALLCMDDIR)
+ perl os2/perl2cmd.pl $(INSTALLCMDDIR)
+
+!NO!SUBS!