summaryrefslogblamecommitdiffstats
path: root/private/mvdm/wow16/write/makefile
blob: e9384c24667cde9067a5410559a82325c0b99f98 (plain) (tree)
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405




















































































































































































































































































































































































































                                                                                                                                                       
##############################################################################
####                                                                      ####
####    Microsoft Windows 3.0 WRITE make file                             ####
####    For use with the MS-DOS version of the UNIX make utility          ####
####                                                                      ####
##############################################################################

WINLIB=..\lib
INCLUDE=-I..\inc -I..\..\inc

#International mods
# NOTE: INTL_SRC, INTL_EXE and LANG are external macros set by international
!IFNDEF LANG
RES_DIR=.\messages\usa
!IFDEF  DBCS
RES_DIR=.\messages\$(DBCS)
!ENDIF
!ELSE
RES_DIR=$(INTL_SRC)\$(LANG)\apps\write
EXE_DIR=$(INTL_EXE)
!ENDIF

APP = write

DEBUGDEF =

########## Path definition so we find 16 bit tools ##########
# Also works around stupid bug in RC 3.1 that doesn't allow rcpp.err to be
# in a directory that is greater than 128 chars down the path, even if
# rc 3.1 is running as an OS/2 app.

PATH    = $(_NTBINDIR)\private\mvdm\tools16;$(PATH)

!if "$(NTDEBUG)"!="" && "$(NTDEBUG)"!="retail" && "$(NTDEBUG)" != "ntsdnodbg"
CDEBUG = /Zd
ADEBUG = -Zd
LDEBUG = /LI
!ENDIF

!ifdef OS2
CFLAGS = /AM /G2sw /Os /Zpe /PLM /DOS2 $(INCLUDE)
DFLAGS =
LFLAGS = /ALIGN:16 /Map /NOD
AFLAGS = -Mx $(INCLUDE)
RCFLAGS = -DOS2 $(INCLUDE)
!else
!ifdef CVW
CFLAGS = /AM /G2sw /Odi /Zipe /W3 /PLM  /DWIN31 $(INCLUDE)
LFLAGS = /ALIGN:16 /Map /NOD
AFLAGS = -Mx -Zi $(INCLUDE)
!else
CFLAGS = /AM /G2sw /Os /Zpe /PLM  /DWIN31 $(INCLUDE) $(CDEBUG)
LFLAGS = /ALIGN:16 /MAP /NOD $(LDEBUG)
AFLAGS = -Mx $(INCLUDE) $(ADEBUG)
!endif
DFLAGS =
RCFLAGS = $(INCLUDE)
!endif

# To make a debug version, you can set this variable from the command line:
#
#       MAKE "DFLAGS=-DDEBUG -Zid"    = turns on general debug code/Codeview
#
#   Additional parameters/defines that can be used:
#
#       -DCKSM            = enables document checksum test code
#       -DDFONT           = enables font stats and info dump
#       -DDFILE           = enables file read/write info dump
#       -DDPRINT          = enables print info dump
#       -DDDISP           = enables any display tests we might add
#       -DBEMG            = ?
#       -DDFLI            = enables FormatLine debug info
#                           (only when form1.c used rather than format.asm)
#       -DPRDRVTEST       = enables some diagnostic code to test character
#                           widths returned by the printer
#       -DDINPUT          = enables diagnostic code in mouse/keyboard
#                           input areas
#       -DDCLIP           = enables clipboard measurement diag output
#       -DDMARGINS        =
#       -DDIAG            = turns on comm. port diagnostic output
#                           [for use with Diag() macro]
#

Res  = write.ico mwlores.cur mwhires.cur pmscur.cur
ResH = menudefs.h dlgdefs.h str.h
ResB = cgabtns.bmp  egabtns.bmp  vgabtns.bmp  8514btns.bmp \
       cgamarks.bmp egamarks.bmp vgamarks.bmp 8514mrks.bmp

OBJ1 = addprm.obj cache.obj chngwin.obj clipbord.obj \
       clipbrd2.obj clipdisp.obj cmd.obj createww.obj curskeys.obj \
       debug.obj diaalert.obj printdlg.obj diadiv.obj diapara.obj \
       diarepag.obj diasubs.obj disp.obj doc.obj doprm.obj \

OBJ2 = doslib.obj edit.obj editpgtb.obj \
       fetch.obj file.obj fileres.obj fileutil.obj fontdlg.obj fontenum.obj \
       fontutil.obj format.obj \
       format2.obj heapmain.obj heaprare.obj jumppage.obj \

OBJ3 = initmmw.obj initwin.obj insert.obj insert2.obj insertco.obj \
       lib.obj loadfont.obj loadfnt2.obj mainloop.obj \
       mdoc.obj menu.obj mglobals.obj mmw.obj \
       mouse.obj open.obj \
       pageinfo.obj pictdrag.obj picture.obj picture2.obj print.obj \

OBJ4 = print2.obj print3.obj quit.obj \
       rare.obj ruler.obj ruler2.obj ruler3.obj running.obj \
       screen.obj scrnchng.obj scrollhz.obj scrollvt.obj search.obj \
       select.obj select2.obj selectsp.obj \

OBJ5 = transfer.obj trans2.obj trans3.obj trans4.obj transbuf.obj \
       undo.obj util.obj util2.obj wwactde.obj \

OBJ6 = obj.obj obj2.obj obj3.obj objreg.obj commdlg.obj objpsp.obj objmini.obj

!IFDEF  DBCS
# use FORM1.C(need to link with HELP.C) instead of FORMAT.ASM
OBJ_DBCS=help.obj
!ENDIF

.asm.obj:
        masm $(AFLAGS) $(DEBUGDEF) $*.asm;

.c.obj:
        cl16 -c $(CFLAGS) $(DFLAGS) $(DEBUGDEF) $*.c

#International mods
!IFNDEF LANG
all:  write.exe
!ELSE
all:  write.$(LANG)
!ENDIF

clean: cleanup all

cleanup:
        del *.res
        del *.rc
        del *.rcv
        del *.dlg
        del *.obj
        del *.sym
        del *.map

!IFDEF  DBCS
$(APP).exe: $(APP).res $(OBJ_DBCS) $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4) $(OBJ5) $(OBJ6) $(APP).def $(APP).lnk
!ELSE
$(APP).exe: $(APP).res $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4) $(OBJ5) $(OBJ6) $(APP).def $(APP).lnk
!ENDIF
#$(APP).exe: $(APP).res $(OBJ6) $(APP).def $(APP).lnk
#       ilink /E "link @$(APP).lnk;rc $(RCFLAGS) $(APP).res $(APP).exe" $(APP)
        link16 @$(APP).lnk
        rc16 $(RCFLAGS) $(APP).res $(APP).exe
!ifndef CVW
        mapsym $(APP)
        copy write.exe write16.exe
        copy write.map write16.map
        copy write.sym write16.sym
        binplace write16.exe write16.map write16.sym
!endif
!   ifdef OS2
    exehdr /newfiles notepad.exe
!   endif

doslib.obj:    doslib.asm

!IFDEF  DBCS
format.obj:    d_form1.c
    cl16 -c $(CFLAGS) $(DFLAGS) $(DEBUGDEF) -Foformat.obj d_form1.c
!ELSE
format.obj:    format.asm
!ENDIF

lib.obj:       lib.asm

msseqds.obj:   msseqds.asm

aaa.obj:       aaa.c

addprm.obj:    addprm.c

cache.obj:     cache.c

chlook.obj:    chlook.c

chngwin.obj:   chngwin.c

clipbord.obj:  clipbord.c

clipbrd2.obj:  clipbrd2.c

clipdisp.obj:  clipdisp.c

cmd.obj:       cmd.c

createww.obj:  createww.c

curskeys.obj:  curskeys.c

debug.obj:     debug.c

diaalert.obj:  diaalert.c

printdlg.obj:  printdlg.c

diadiv.obj:    diadiv.c

diapara.obj:   diapara.c

diarepag.obj:  diarepag.c

diasubs.obj:   diasubs.c

!IFDEF  DBCS
disp.obj:      d_disp.c
    cl16 -c $(CFLAGS) $(DFLAGS) $(DEBUGDEF)-Fodisp.obj d_disp.c
!ELSE
disp.obj:      disp.c
!ENDIF

doc.obj:       doc.c

doprm.obj:     doprm.c

edit.obj:      edit.c

editftn.obj:   editftn.c

editpgtb.obj:  editpgtb.c

editsect.obj:  editsect.c

fetch.obj:     fetch.c

file.obj:      file.c

fileres.obj:   fileres.c

fileutil.obj:  fileutil.c

fontdlg.obj:   fontdlg.c

fontenum.obj:  fontenum.c

fontutil.obj:  fontutil.c

form1.obj:     form1.c

format2.obj:   format2.c

heapinit.obj:  heapinit.c

heapmain.obj:  heapmain.c

heaprare.obj:  heaprare.c

help.obj:      help.c

initmmw.obj:   initmmw.c

initwin.obj:   initwin.c

insert.obj:    insert.c

insert2.obj:   insert2.c

insertco.obj:  insertco.c

jumppage.obj:  jumppage.c

loadfnt2.obj:  loadfnt2.c

loadfont.obj:  loadfont.c

mainloop.obj:  mainloop.c

mdoc.obj:      mdoc.c

menu.obj:      menu.c

mglobals.obj:  mglobals.c

mmw.obj:       mmw.c

mouse.obj:     mouse.c

open.obj:      open.c

ole.obj:       ole.c

pageinfo.obj:  pageinfo.c

pictdrag.obj:  pictdrag.c

picture.obj:   picture.c

picture2.obj:  picture2.c

print.obj:     print.c

print2.obj:    print2.c

print3.obj:    print3.c

quit.obj:      quit.c

rare.obj:      rare.c

ruler.obj:     ruler.c

ruler2.obj:    ruler2.c

ruler3.obj:    ruler3.c

running.obj:   running.c

screen.obj:    screen.c

scrnchng.obj:  scrnchng.c

scrollhz.obj:  scrollhz.c

scrollvt.obj:  scrollvt.c

search.obj:    search.c

select.obj:    select.c

!IFDEF  DBCS
select2.obj:    d_selec2.c
    cl16 -c $(CFLAGS) $(DFLAGS) $(DEBUGDEF)-Foselect2.obj d_selec2.c
!ELSE
select2.obj:   select2.c
!ENDIF

selectsp.obj:  selectsp.c

trans2.obj:    trans2.c

trans3.obj:    trans3.c

trans4.obj:    trans4.c

transbuf.obj:  transbuf.c

transfer.obj:  transfer.c

undo.obj:      undo.c

util.obj:      util.c

util2.obj:     util2.c

wwactde.obj:   wwactde.c

#International mods
!IFNDEF LANG
$(APP).rc: $(RES_DIR)\$(APP).rc
    copy $(RES_DIR)\$(APP).rc

$(APP).rcv: $(RES_DIR)\$(APP).rcv
    copy $(RES_DIR)\$(APP).rcv

$(APP).dlg: $(RES_DIR)\$(APP).dlg
    copy $(RES_DIR)\$(APP).dlg

ole.dlg: $(RES_DIR)\ole.dlg
    copy $(RES_DIR)\ole.dlg

$(APP).res: $(APP).rc $(APP).rcv $(APP).dlg ..\inc\common.ver ..\inc\version.h ..\inc\ver.h ole.dlg $(Res) $(ResH) $(ResB)
        rc16 $(RCFLAGS) -r $(APP).rc
!ELSE
$(APP).res: $(RES_DIR)\$(APP).res
    copy $(RES_DIR)\$(APP).res
!ENDIF

$(APP).lnk: MAKEFILE $(APP).sed
        sed -n -f $(APP).sed MAKEFILE > $(APP).lnk
!IFDEF  DBCS
        sed "s/format\.obj/format\.obj help\.obj/" $(APP).lnk > $(DBCS).lnk
        copy  $(DBCS).lnk $(APP).lnk
        del $(DBCS).lnk
!ENDIF
        echo $(APP) $(LFLAGS) >> $(APP).lnk
        echo $(APP) >> $(APP).lnk
!IFDEF  DBCS
        echo $(WINLIB)\winnls.lib $(WINLIB)\mlibcew.lib $(WINLIB)\libw.lib $(WINLIB)\olecli.lib $(WINLIB)\commdlg.lib $(WINLIB)\shell.lib >> $(APP).lnk
!ELSE
        echo $(WINLIB)\mlibcew.lib $(WINLIB)\libw.lib $(WINLIB)\olecli.lib $(WINLIB)\commdlg.lib $(WINLIB)\shell.lib >> $(APP).lnk
!ENDIF
        echo $(APP).def >> $(APP).lnk

#International mods
clean: cleanup all

cleanup:
    del *.res
    del *.rc
    del *.dlg

$(APP).$(LANG): $(APP).res ..\inc\common.ver ..\inc\version.h ..\inc\ver.h
    copy $(EXE_DIR)\$(APP).exe $(APP).$(LANG)
    rc16 -t $(RCFLAGS) $(APP).res $(APP).$(LANG)
    copy $(app).$(LANG) write16.exe
    copy write.sym write16.sym
    -binplace write16.exe write16.sym