1#
2#########################################################################
3#
4# makefile for The Hessling Editor (THE)
5#
6# You need the following environment variable set like:
7# THE_SRCDIR=c:\the
8# PDCURSES_BINDIR=c:\pdc
9# PDCURSES_SRCDIR=c:\pdcurses
10# REGINA_SRCDIR=c:\regina
11# REGINA_BINDIR=c:\regina
12#
13#########################################################################
14#
15
16TARGET=os2
17SYSTEM=os2v2
18THE_TARGET=__OS2__
19
20#########################################################################
21# Watcom  compiler on Win32
22#########################################################################
23SRC       = $(%THE_SRCDIR)\
24WATCOMSRC = $(%WATCOM)\src\startup\
25CURSLIB   = $(%PDCURSES_HOMEDIR)\$(SYSTEM)\pdcurses.lib
26CURSINC   = /i=$(%PDCURSES_SRCDIR)
27REXXINC   = /i=$(%REGINA_SRCDIR) /DUSE_REGINA
28REXXLIB   = $(%REGINA_HOMEDIR)\$(SYSTEM)\rexx.lib
29
30PROJ      = the.exe
31OBJ       = obj
32CC        = wcc386
33
34!include $(SRC)the.ver
35
36!ifeq DEBUG Y
37CFLAGS    = /bt=$(TARGET) /d2 /zq /mf /DSTDC_HEADERS /DPROTO /D$(THE_TARGET) /i=$(SRC) $(CURSINC) $(REXXINC) /fo=$@
38LDEBUG    = debug all
39!else
40CFLAGS    = /bt=$(TARGET) /oneatx /zq /mf /DSTDC_HEADERS /DPROTO /D$(THE_TARGET) /i=$(SRC) $(CURSINC) $(REXXINC) /fo=$@
41LDEBUG    =
42DEBUG     = N
43!endif
44LD        = wlink
45XTRAOBJ   = mygetopt.obj
46docdir = doc
47
48#########################################################################
49#
50#
51# Object files
52#
53OBJ1 = box.$(OBJ) colour.$(OBJ) comm1.$(OBJ) comm2.$(OBJ) comm3.$(OBJ) comm4.$(OBJ) comm5.$(OBJ) &
54	commset1.$(OBJ) commset2.$(OBJ) commsos.$(OBJ) cursor.$(OBJ) default.$(OBJ) &
55	edit.$(OBJ) error.$(OBJ) execute.$(OBJ) linked.$(OBJ) column.obj mouse.obj memory.obj &
56	nonansi.$(OBJ) prefix.$(OBJ) parser.$(OBJ) reserved.$(OBJ) scroll.$(OBJ) show.$(OBJ) sort.$(OBJ) &
57	target.$(OBJ) the.$(OBJ) util.$(OBJ) print.$(OBJ) regex.obj alloca.obj
58OBJ2 = commutil.$(OBJ) #trace.obj
59OBJ3 = getch.$(OBJ)
60OBJ4 = query.$(OBJ) query1.$(OBJ) query2.$(OBJ)
61OBJ5 = thematch.$(OBJ)
62OBJ6 = directry.$(OBJ) file.$(OBJ)
63OBJ7 = rexx.$(OBJ)
64OBJ8 = wildargv.obj
65OBJX = $(XTRAOBJ)
66OBJS = $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4) $(OBJ5) $(OBJ6) $(OBJ7) $(OBJ8) $(OBJX)
67#########################################################################
68
69COMM = $(SRC)comm1.c $(SRC)comm2.c $(SRC)comm3.c $(SRC)comm4.c $(SRC)comm5.c &
70	$(SRC)commsos.c $(SRC)commset1.c $(SRC)commset2.c $(SRC)query.c
71
72APPENDIX = $(SRC)appendix.1
73GLOSSARY = $(SRC)glossary
74
75all: how $(PROJ)
76
77how: .SYMBOLIC
78	echo wmake -f $(SRC)wccos2.mak DEBUG=$(DEBUG) > rebuild.bat
79#
80#########################################################################
81$(PROJ):	$(OBJS)
82	@%create dummy.lnk
83	@%append dummy.lnk  option quiet
84	@%append dummy.lnk  option map
85	@%append dummy.lnk  option stack=256k
86	@%append dummy.lnk  system $(SYSTEM)
87	@%append dummy.lnk  name the.exe
88	@%append dummy.lnk  file *.obj
89	@%append dummy.lnk  library $(CURSLIB)
90	@%append dummy.lnk  library $(REXXLIB)
91	$(LD) $(LDEBUG) $(LDFLAGS) @dummy.lnk
92	%erase dummy.lnk
93#########################################################################
94box.obj:	$(SRC)box.c $(SRC)the.h $(SRC)thedefs.h $(SRC)proto.h
95	$(CC) $(CFLAGS) $(SRC)$*.c
96colour.obj:	$(SRC)colour.c $(SRC)the.h $(SRC)thedefs.h $(SRC)proto.h
97	$(CC) $(CFLAGS) $(SRC)$*.c
98comm1.obj:	$(SRC)comm1.c $(SRC)the.h $(SRC)thedefs.h $(SRC)proto.h
99	$(CC) $(CFLAGS) $(SRC)$*.c
100comm2.obj:	$(SRC)comm2.c $(SRC)the.h $(SRC)thedefs.h $(SRC)proto.h
101	$(CC) $(CFLAGS) $(SRC)$*.c
102comm3.obj:	$(SRC)comm3.c $(SRC)the.h $(SRC)thedefs.h $(SRC)proto.h
103	$(CC) $(CFLAGS) $(SRC)$*.c
104comm4.obj:	$(SRC)comm4.c $(SRC)the.h $(SRC)thedefs.h $(SRC)proto.h
105	$(CC) $(CFLAGS) $(SRC)$*.c
106comm5.obj:	$(SRC)comm5.c $(SRC)the.h $(SRC)thedefs.h $(SRC)proto.h
107	$(CC) $(CFLAGS) $(SRC)$*.c
108commset1.obj:	$(SRC)commset1.c $(SRC)the.h $(SRC)thedefs.h $(SRC)proto.h
109	$(CC) $(CFLAGS) $(SRC)$*.c
110commset2.obj:	$(SRC)commset2.c $(SRC)the.h $(SRC)thedefs.h $(SRC)proto.h
111	$(CC) $(CFLAGS) $(SRC)$*.c
112commsos.obj:	$(SRC)commsos.c $(SRC)the.h $(SRC)thedefs.h $(SRC)proto.h
113	$(CC) $(CFLAGS) $(SRC)$*.c
114cursor.obj:	$(SRC)cursor.c $(SRC)the.h $(SRC)thedefs.h $(SRC)proto.h
115	$(CC) $(CFLAGS) $(SRC)$*.c
116default.obj:	$(SRC)default.c $(SRC)the.h $(SRC)thedefs.h $(SRC)proto.h
117	$(CC) $(CFLAGS) $(SRC)$*.c
118edit.obj:	$(SRC)edit.c $(SRC)the.h $(SRC)thedefs.h $(SRC)proto.h
119	$(CC) $(CFLAGS) $(SRC)$*.c
120error.obj:	$(SRC)error.c $(SRC)the.h $(SRC)thedefs.h $(SRC)proto.h
121	$(CC) $(CFLAGS) $(SRC)$*.c
122execute.obj:	$(SRC)execute.c $(SRC)the.h $(SRC)thedefs.h $(SRC)proto.h
123	$(CC) $(CFLAGS) $(SRC)$*.c
124linked.obj:	$(SRC)linked.c $(SRC)the.h $(SRC)thedefs.h $(SRC)proto.h
125	$(CC) $(CFLAGS) $(SRC)$*.c
126column.obj:	$(SRC)column.c $(SRC)the.h $(SRC)thedefs.h $(SRC)proto.h
127	$(CC) $(CFLAGS) $(SRC)$*.c
128mouse.obj:	$(SRC)mouse.c $(SRC)the.h $(SRC)thedefs.h $(SRC)proto.h
129	$(CC) $(CFLAGS) $(SRC)$*.c
130memory.obj:	$(SRC)memory.c $(SRC)the.h $(SRC)thedefs.h $(SRC)proto.h
131	$(CC) $(CFLAGS) $(SRC)$*.c
132nonansi.obj:	$(SRC)nonansi.c $(SRC)the.h $(SRC)thedefs.h $(SRC)proto.h
133	$(CC) $(CFLAGS) $(SRC)$*.c
134parser.obj:	$(SRC)parser.c $(SRC)the.h $(SRC)thedefs.h $(SRC)proto.h
135	$(CC) $(CFLAGS) $(SRC)$*.c
136prefix.obj:	$(SRC)prefix.c $(SRC)the.h $(SRC)thedefs.h $(SRC)proto.h
137	$(CC) $(CFLAGS) $(SRC)$*.c
138print.obj:	$(SRC)print.c $(SRC)the.h $(SRC)thedefs.h $(SRC)proto.h
139	$(CC) $(CFLAGS) $(SRC)$*.c
140regex.obj:	$(SRC)regex.c $(SRC)\the.h $(SRC)\thedefs.h $(SRC)\proto.h
141	$(CC) $(CFLAGS) $(SRC)\$*.c
142alloca.obj:	$(SRC)alloca.c $(SRC)\the.h $(SRC)\thedefs.h $(SRC)\proto.h
143	$(CC) $(CFLAGS) $(SRC)\$*.c
144reserved.obj:	$(SRC)reserved.c $(SRC)the.h $(SRC)thedefs.h $(SRC)proto.h
145	$(CC) $(CFLAGS) $(SRC)$*.c
146scroll.obj:	$(SRC)scroll.c $(SRC)the.h $(SRC)thedefs.h $(SRC)proto.h
147	$(CC) $(CFLAGS) $(SRC)$*.c
148show.obj:	$(SRC)show.c $(SRC)the.h $(SRC)thedefs.h $(SRC)proto.h
149	$(CC) $(CFLAGS) $(SRC)$*.c
150sort.obj:	$(SRC)sort.c $(SRC)the.h $(SRC)thedefs.h $(SRC)proto.h
151	$(CC) $(CFLAGS) $(SRC)$*.c
152target.obj:	$(SRC)target.c $(SRC)the.h $(SRC)thedefs.h $(SRC)proto.h
153	$(CC) $(CFLAGS) $(SRC)$*.c
154the.obj:	$(SRC)the.c $(SRC)the.h $(SRC)thedefs.h $(SRC)proto.h $(SRC)the.ver
155	$(CC) $(CFLAGS) -DTHE_VERSION=$(VER_DOT) -DTHE_VERSION_DATE=$(VER_DATE) $(SRC)$*.c
156util.obj:	$(SRC)util.c $(SRC)the.h $(SRC)thedefs.h $(SRC)proto.h
157	$(CC) $(CFLAGS) $(SRC)$*.c
158commutil.obj:	$(SRC)commutil.c $(SRC)the.h $(SRC)command.h $(SRC)thedefs.h $(SRC)proto.h $(SRC)getch.h $(SRC)key.h
159	$(CC) $(CFLAGS) $(SRC)$*.c
160trace.obj:	$(SRC)trace.c $(SRC)the.h $(SRC)command.h $(SRC)thedefs.h $(SRC)proto.h $(SRC)getch.h $(SRC)key.h
161	$(CC) $(CFLAGS) $(SRC)$*.c
162getch.obj:	$(SRC)getch.c $(SRC)getch.h $(SRC)thedefs.h $(SRC)proto.h
163	$(CC) $(CFLAGS) $(SRC)$*.c
164query.obj:	$(SRC)query.c $(SRC)query.h $(SRC)the.h $(SRC)thedefs.h $(SRC)proto.h
165	$(CC) $(CFLAGS) $(SRC)$*.c
166query1.obj:	$(SRC)query1.c $(SRC)query.h $(SRC)the.h $(SRC)thedefs.h $(SRC)proto.h
167	$(CC) $(CFLAGS) $(SRC)$*.c
168query2.obj:	$(SRC)query2.c $(SRC)query.h $(SRC)the.h $(SRC)thedefs.h $(SRC)proto.h
169	$(CC) $(CFLAGS) $(SRC)$*.c
170thematch.obj:	$(SRC)thematch.c $(SRC)the.h $(SRC)thematch.h
171	$(CC) $(CFLAGS) $(SRC)$*.c
172directry.obj:	$(SRC)directry.c $(SRC)the.h $(SRC)directry.h $(SRC)thedefs.h $(SRC)proto.h
173	$(CC) $(CFLAGS) $(SRC)$*.c
174file.obj:	$(SRC)file.c $(SRC)the.h $(SRC)directry.h $(SRC)thedefs.h $(SRC)proto.h
175	$(CC) $(CFLAGS) $(SRC)$*.c
176rexx.obj:	$(SRC)rexx.c $(SRC)the.h $(SRC)therexx.h $(SRC)proto.h $(SRC)thedefs.h $(SRC)query.h
177	$(CC) $(CFLAGS) $(SRC)$*.c
178mygetopt.obj:	$(SRC)mygetopt.c
179	$(CC) $(CFLAGS) $(SRC)$*.c
180
181wildargv.obj:	$(WATCOMSRC)wildargv.c
182	$(CC) $(CFLAGS) $(WATCOMSRC)$*.c
183#
184#########################################################################
185