perl 3.0 patch #19 (combined patch)
[p5sagit/p5-mst-13.2.git] / os2 / Makefile
1 #
2 # Makefile for compiling Perl under OS/2
3 #
4 # Needs a Unix compatible make.
5 # This makefile works for an initial compilation.  It does not
6 # include all dependencies and thus is unsuitable for serious
7 # development work.  Hey, I'm just inheriting what Diomidis gave me.
8 #
9 # Originally by Diomidis Spinellis, March 1990
10 # Adjusted for OS/2 port by Raymond Chen, June 1990
11 #
12
13 # Source files
14 SRC = array.c cmd.c cons.c consarg.c doarg.c doio.c dolist.c dump.c \
15 eval.c form.c hash.c perl.y perly.c regcomp.c regexec.c \
16 stab.c str.c toke.c util.c os2.c popen.c director.c
17
18 # Object files
19 OBJ = perl.obj array.obj cmd.obj cons.obj consarg.obj doarg.obj doio.obj \
20 dolist.obj dump.obj eval.obj form.obj hash.obj perly.obj regcomp.obj \
21 regexec.obj stab.obj str.obj toke.obj util.obj os2.obj popen.obj \
22 director.obj suffix.obj
23
24 # Files in the OS/2 distribution
25 DOSFILES=config.h director.c makefile os2.c popen.c suffix.c readme.os2
26
27 # Yacc flags
28 YFLAGS=-d
29
30 # Manual pages
31 MAN=perlman.1 perlman.2 perlman.3 perlman.4
32
33 CC=cl
34 # CBASE = flags everybody gets
35 # CPLAIN = flags for modules that give the compiler indigestion
36 # CFLAGS = flags for milder modules
37 # PERL = which version of perl to build
38 #
39 # For preliminary building:  No optimization, DEBUGGING set, symbols included.
40 #CBASE=-AL -Zi -G2 -Gs -DDEBUGGING
41 #CPLAIN=$(CBASE) -Od
42 #CFLAGS=$(CBASE) -Od
43 #PERL=perlsym.exe
44
45 # For the final build:  Optimization on, no DEBUGGING, symbols stripped.
46 CBASE=-AL -Zi -G2 -Gs
47 CPLAIN=$(CBASE) -Oilt
48 CFLAGS=$(CBASE) -Ox
49 PERL=perl.exe
50
51 # Destination directory for executables
52 DESTDIR=\usr\bin
53
54 # Deliverables
55
56 all: $(PERL) glob.exe
57
58 perl.exe: $(OBJ) perl.arp
59         link @perl.arp,perl,nul,/stack:32767 /NOE;
60         exehdr /nologo /newfiles /pmtype:windowcompat perl.exe >nul
61
62 perlsym.exe: $(OBJ) perl.arp
63         link @perl.arp,perlsym,nul,/stack:32767 /NOE /CODE;
64         exehdr /nologo /newfiles /pmtype:windowcompat perlsym.exe >nul
65
66 perl.arp:
67         echo array+cmd+cons+consarg+doarg+doio+dolist+dump+ >perl.arp
68         echo eval+form+hash+perl+perly+regcomp+regexec+stab+suffix+ >>perl.arp
69         echo str+toke+util+os2+popen+director+\c600\lib\setargv >>perl.arp
70
71 glob.exe: glob.c
72         $(CC) glob.c \c600\lib\setargv.obj -link /NOE
73         exehdr /nologo /newfiles /pmtype:windowcompat glob.exe >nul
74
75 array.obj: array.c
76         $(CC) $(CPLAIN) -c array.c
77 cmd.obj: cmd.c
78 cons.obj: cons.c perly.h
79 consarg.obj: consarg.c
80 #       $(CC) $(CPLAIN) -c consarg.c
81 doarg.obj: doarg.c
82 doio.obj: doio.c
83 dolist.obj: dolist.c
84 dump.obj: dump.c
85 eval.obj: eval.c evalargs.xc
86         $(CC) /B3 \c600\binp\c3l $(CFLAGS) -c eval.c
87 form.obj: form.c
88 hash.obj: hash.c
89 perl.obj: perl.y
90 perly.obj: perly.c
91 regcomp.obj: regcomp.c
92 regexec.obj: regexec.c
93 stab.obj: stab.c
94         $(CC) $(CPLAIN) -c stab.c
95 str.obj: str.c
96 suffix.obj: suffix.c
97 toke.obj: toke.c
98         $(CC) /B3 \c600\binp\c3l $(CFLAGS) -c toke.c
99 util.obj: util.c
100 #       $(CC) $(CPLAIN) -c util.c
101 perly.h: ytab.h
102         cp ytab.h perly.h
103 director.obj: director.c
104 popen.obj: popen.c
105 os2.obj: os2.c
106
107 perl.1: $(MAN)
108         nroff -man $(MAN) >perl.1
109
110 install: all
111         exepack perl.exe $(DESTDIR)\perl.exe
112         exepack glob.exe $(DESTDIR)\glob.exe
113
114 clean:
115         rm -f *.obj *.exe perl.1 perly.h perl.arp
116
117 tags:
118         ctags *.c *.h *.xc
119
120 dosperl:
121         mv $(DOSFILES) ../perl30.new
122
123 doskit:
124         mv $(DOSFILES) ../os2