perl 3.0 patch #32 patch #29, continued
[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 suffix.c mktemp.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 mktemp.obj
23
24 # Files in the OS/2 distribution
25 DOSFILES=config.h director.c dir.h makefile os2.c popen.c suffix.c \
26 mktemp.c readme.os2
27
28 # Yacc flags
29 YFLAGS=-d
30
31 # Manual pages
32 MAN=perlman.1 perlman.2 perlman.3 perlman.4
33
34 CC=cl
35 # CBASE = flags everybody gets
36 # CPLAIN = flags for modules that give the compiler indigestion
37 # CFLAGS = flags for milder modules
38 # PERL = which version of perl to build
39 #
40 # For preliminary building:  No optimization, DEBUGGING set, symbols included.
41 #CBASE=-AL -Zi -G2 -Gs -DDEBUGGING
42 #CPLAIN=$(CBASE) -Od
43 #CFLAGS=$(CBASE) -Od
44 #PERL=perlsym.exe
45
46 # For the final build:  Optimization on, symbols stripped.
47 CBASE=-AL -Zi -G2 -Gs -DDEBUGGING
48 CPLAIN=$(CBASE) -Olt
49 CFLAGS=$(CBASE) -Oeglt
50 PERL=perl.exe
51
52 # Destination directory for executables
53 DESTDIR=\usr\bin
54
55 # Deliverables
56 #
57 all: $(PERL) glob.exe
58
59 perl.exe: $(OBJ) perl.arp
60         link @perl.arp,perl,nul,/stack:32767 /NOE;
61         exehdr /nologo /newfiles /pmtype:windowcompat perl.exe >nul
62
63 perlsym.exe: $(OBJ) perl.arp
64         link @perl.arp,perlsym,nul,/stack:32767 /NOE /CODE;
65         exehdr /nologo /newfiles /pmtype:windowcompat perlsym.exe >nul
66
67 perl.arp:
68         echo array+cmd+cons+consarg+doarg+doio+dolist+dump+ >perl.arp
69         echo eval+form+hash+perl+perly+regcomp+regexec+stab+suffix+ >>perl.arp
70         echo str+toke+util+os2+popen+director+\c600\lib\setargv >>perl.arp
71
72 glob.exe: glob.c
73         $(CC) glob.c setargv.obj -link /NOE
74         exehdr /nologo /newfiles /pmtype:windowcompat glob.exe >nul
75
76 array.obj: array.c
77         $(CC) $(CPLAIN) -c array.c
78 cmd.obj: cmd.c
79 cons.obj: cons.c perly.h
80 consarg.obj: consarg.c
81 #       $(CC) $(CPLAIN) -c consarg.c
82 doarg.obj: doarg.c
83 doio.obj: doio.c
84 dolist.obj: dolist.c
85 dump.obj: dump.c
86 eval.obj: eval.c evalargs.xc
87         $(CC) /B2c2l /B3c3l $(CFLAGS) -c eval.c
88 form.obj: form.c
89 hash.obj: hash.c
90 perl.obj: perl.y
91 perly.obj: perly.c
92 regcomp.obj: regcomp.c
93 regexec.obj: regexec.c
94 stab.obj: stab.c
95         $(CC) $(CPLAIN) -c stab.c
96 str.obj: str.c
97 suffix.obj: suffix.c
98 toke.obj: toke.c
99         $(CC) /B3c3l $(CFLAGS) -c toke.c
100 util.obj: util.c
101 #       $(CC) $(CPLAIN) -c util.c
102 perly.h: ytab.h
103         cp ytab.h perly.h
104 director.obj: director.c
105 popen.obj: popen.c
106 os2.obj: os2.c
107
108 perl.1: $(MAN)
109         nroff -man $(MAN) >perl.1
110
111 install: all
112         exepack perl.exe $(DESTDIR)\perl.exe
113         exepack glob.exe $(DESTDIR)\glob.exe
114
115 clean:
116         rm -f *.obj *.exe perl.1 perly.h perl.arp
117
118 tags:
119         ctags *.c *.h *.xc
120
121 dosperl:
122         mv $(DOSFILES) ../perl30.new
123
124 doskit:
125         mv $(DOSFILES) ../os2