blob: bc99fd113b2ae305b0771ff27a8a9f1e4303f2bc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
# 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"' >>$@
echo ' "Perl_OS2_init"' >>$@
echo ' "OS2_Perl_data"' >>$@
!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!
|