perl 3.0 patch #24 patch #19, continued
[p5sagit/p5-mst-13.2.git] / msdos / Makefile
1 #
2 # Makefile for compiling Perl under MS-DOS
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.  But who would do serious development under
8 # MS-DOS?
9 #
10 # By Diomidis Spinellis, March 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 msdos.c popen.c directory.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 msdos.obj popen.obj \
22 directory.obj
23
24 # Files in the MS-DOS distribution
25 DOSFILES=config.h dir.h director.c glob.c makefile msdos.c popen.c readme.msd \
26 changes.dds wishlist.dds patches manifest
27
28 # Yacc flags
29 YFLAGS=-d
30
31 # Manual pages
32 MAN=perlman.1 perlman.2 perlman.3 perlman.4
33
34 CC=cc
35 # Cflags for the files that break under the optimiser
36 CPLAIN=-AL -DCRIPPLED_CC
37 # Cflags for all the rest
38 CFLAGS=$(CPLAIN) -Ox
39 # Destination directory for executables
40 DESTDIR=\usr\bin
41
42 # Deliverables
43 all: perl.exe perl.1 glob.exe
44
45 perl.exe: $(OBJ)
46         echo array+cmd+cons+consarg+doarg+doio+dolist+dump+ >perl.arp
47         echo eval+form+hash+perl+perly+regcomp+regexec+ >>perl.arp
48         echo stab+str+toke+util+msdos+popen+directory+\lib\setargv >>perl.arp
49         echo perl.exe >>perl.arp
50         echo nul >>perl.arp
51         echo /stack:32767 /NOE >>perl.arp
52         link @perl.arp
53
54 glob.exe: glob.c
55         $(CC) glob.c \lib\setargv.obj -link /NOE
56
57 array.obj: array.c
58 cmd.obj: cmd.c
59 cons.obj: cons.c perly.h
60 consarg.obj: consarg.c
61         $(CC) $(CPLAIN) -c consarg.c
62 doarg.obj: doarg.c
63 doio.obj: doio.c
64 dolist.obj: dolist.c
65 dump.obj: dump.c
66 eval.obj: eval.c evalargs.xc
67 form.obj: form.c
68 hash.obj: hash.c
69 perl.obj: perl.y
70 perly.obj: perly.c
71 regcomp.obj: regcomp.c
72 regexec.obj: regexec.c
73 stab.obj: stab.c
74 str.obj: str.c
75 toke.obj: toke.c
76 util.obj: util.c
77         $(CC) $(CPLAIN) -c util.c
78 perly.h: perl.obj
79         mv ytab.h perly.h
80 directory.obj: directory.c
81 popen.obj: popen.c
82 msdos.obj: msdos.c
83
84 perl.1: $(MAN)
85         nroff -man $(MAN) >perl.1
86
87 install: all
88         exepack perl.exe $(DESTDIR)\perl.exe
89         exepack glob.exe $(DESTDIR)\glob.exe
90
91 clean:
92         rm -f *.obj *.exe perl.1 perly.h perl.arp
93
94 tags:
95         ctags *.c *.h *.xc
96
97 dosperl:
98         mv $(DOSFILES) ../perl30.new
99
100 doskit:
101         mv $(DOSFILES) ../msdos