forked from Bill-Gray/PDCursesMod
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwatcom.mif
213 lines (182 loc) · 4.82 KB
/
watcom.mif
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
# Common elements for the Watcom makefiles
!ifeq TARGET dos
!ifneq MODEL f
TARGET16 = 1
!endif
!endif
!ifdef __UNIX__
DEL = rm -f
COPY = cp
!else
DEL = del
COPY = copy
!endif
!ifeq TARGET linux
!else
E = .exe
!endif
.EXTENSIONS :
!ifeq TARGET linux
.EXTENSIONS : . .lib .obj .h .c
!else
.EXTENSIONS : $(E) .dll .lib .res .obj .rc .h .c
!endif
!ifdef TARGET16
CC = *wcc
!else
CC = *wcc386
MODEL = f
!endif
LIBEXE = *wlib -q -n -b -c -t -pa
LINK = *wlink
RC = *wrc
!ifdef DLL
cflags_dll_nt = -bd
cflags_dll_os2 = -bd -DPDC_DLL_BUILD
cflags_dll_imp_nt = -DPDC_DLL_BUILD
!endif
CFLAGS += -bt=$(TARGET) -m$(MODEL) -wx -zq -i=$(PDCURSES_SRCDIR)
!ifeq DEBUG Y
CFLAGS += -d2 -DDEBUG -DPDCDEBUG
!ifdef TARGET16
CFLAGS += -hw
!else
CFLAGS += -hd
!endif
!else
CFLAGS += -s -oneatx -DNDEBUG
!endif
!ifdef CHTYPE_32
CFLAGS += -DCHTYPE_32
!endif
!ifeq WIDE Y
CFLAGS += -DPDC_WIDE
!endif
!ifeq UTF8 Y
CFLAGS += -DPDC_FORCE_UTF8
!endif
!ifeq TARGET dos
CFLAGS += -DDOS
!endif
!ifdef cflags_dll_$(TARGET)
CFLAGS += $(cflags_dll_imp_$(TARGET))
DLL_CFLAGS_ = $(cflags_dll_$(TARGET))
!endif
!ifdef DLL
ltarget_dll_nt = nt_dll
ltarget_dll_os2 = os2v2_dll
!endif
LDFLAGS = op q, noext
!ifeq DEBUG Y
!ifdef TARGET16
LDFLAGS += debug watcom all
!else
LDFLAGS += debug dwarf all
!endif
!endif
srcdir = $(PDCURSES_SRCDIR)/pdcurses
demodir = $(PDCURSES_SRCDIR)/demos
LIBOBJS = addch.obj addchstr.obj addstr.obj attr.obj beep.obj bkgd.obj &
border.obj clear.obj color.obj delch.obj deleteln.obj &
getch.obj getstr.obj getyx.obj inch.obj inchstr.obj initscr.obj inopts.obj &
insch.obj insstr.obj instr.obj kernel.obj keyname.obj mouse.obj move.obj &
outopts.obj overlay.obj pad.obj panel.obj printw.obj refresh.obj &
scanw.obj scr_dump.obj scroll.obj slk.obj termattr.obj &
touch.obj util.obj window.obj debug.obj
PDCOBJS = pdcclip.obj pdcdisp.obj pdcgetsc.obj pdckbd.obj pdcscrn.obj &
pdcsetsc.obj pdcutil.obj
DEMOS = calendar$(E) firework$(E) init_col$(E) mbrot$(E) newtest$(E) &
ozdemo$(E) picsview$(E) ptest$(E) rain$(E) speed$(E) test_pan$(E) &
testcurs$(E) tuidemo$(E) widetest$(E) worm$(E) xmas$(E)
PDCNAME = pdcurses
!ifdef __LOADDLL__
! loaddll wcc wccd
! loaddll wcc386 wccd386
! loaddll wlink wlinkd
! loaddll wlib wlibd
!endif
all: $(PDCNAME).lib
.c: $(srcdir);$(PDCURSES_SRCDIR)/$(osdir);$(demodir)
.c.obj: .autodepend
!ifeq TARGET dos
@set INCLUDE=$(%WATCOM)/h
!else ifeq TARGET os2
@set INCLUDE=$(%WATCOM)/h;$(%WATCOM)/h/os2
!else ifeq TARGET nt
@set INCLUDE=$(%WATCOM)/h;$(%WATCOM)/h/nt
!else ifeq TARGET linux
@set INCLUDE=$(%WATCOM)/lh
!endif
$(CC) $(CFLAGS) $(DLL_CFLAGS_$(build_dll_$^&)) -fo=$@ $<
!ifeq TARGET linux
.obj.:
!else
.obj$(E):
!endif
$(LINK) $(LDFLAGS) name $@ sys $(LTARGET) file $*.obj lib $(PDCNAME).lib $(ADDED_LIBS)
build_dll_calendar = no
build_dll_firework = no
build_dll_init_col = no
build_dll_mbrot = no
build_dll_newtest = no
build_dll_ozdemo = no
build_dll_picsview = no
build_dll_ptest = no
build_dll_rain = no
build_dll_test_pan = no
build_dll_testcurs = no
build_dll_tui = no
build_dll_tuidemo = no
build_dll_widetest = no
build_dll_worm = no
build_dll_xmas = no
calendar$(E): calendar.obj $(PDCNAME).lib
firework$(E): firework.obj $(PDCNAME).lib
init_col$(E): init_col.obj $(PDCNAME).lib
mbrot$(E): mbrot.obj $(PDCNAME).lib
newtest$(E): newtest.obj $(PDCNAME).lib
ozdemo$(E): ozdemo.obj $(PDCNAME).lib
picsview$(E): picsview.obj $(PDCNAME).lib
ptest$(E): ptest.obj $(PDCNAME).lib
rain$(E): rain.obj $(PDCNAME).lib
testcurs$(E): testcurs.obj $(PDCNAME).lib
test_pan$(E): test_pan.obj $(PDCNAME).lib
widetest$(E): widetest.obj $(PDCNAME).lib
worm$(E): worm.obj $(PDCNAME).lib
xmas$(E): xmas.obj $(PDCNAME).lib
tuidemo$(E): tuidemo.obj tui.obj $(PDCNAME).lib
$(LINK) $(LDFLAGS) name $@ sys $(LTARGET) file {tuidemo.obj tui.obj} lib $(PDCNAME).lib $(ADDED_LIBS)
!ifdef ltarget_dll_$(TARGET)
version_res_nt = $(PDCNAME).res
.rc: $(PDCURSES_SRCDIR)/common
.rc.res:
!ifeq TARGET nt
@set INCLUDE=$(%WATCOM)/h;$(%WATCOM)/h/nt
!endif
$(RC) -r -bt=$(TARGET) $< -fo=$@
!endif
$(PDCNAME).lbc : $(LIBOBJS) $(PDCOBJS) $(version_res_$(TARGET))
!ifdef ltarget_dll_$(TARGET)
$(LINK) $(LDFLAGS) name $(PDCNAME).dll sys $(ltarget_dll_$(TARGET)) opt impfile=$@ file {$(LIBOBJS) $(PDCOBJS)} $(ADDED_LIBS_FOR_DLL)
!ifdef version_res_$(TARGET)
$(RC) -k -bt=$(TARGET) $(version_res_$(TARGET)) $(PDCNAME).dll
!endif
!else
%write $@ $(LIBOBJS) $(PDCOBJS)
!endif
$(PDCNAME).lib : $(PDCNAME).lbc
$(LIBEXE) $@ @$<
!ifdef EXTRA_LIB_CMD
$(EXTRA_LIB_CMD)
!endif
demos: $(DEMOS)
dist: .symbolic
clean: .symbolic
@if exist *.obj -$(DEL) *.obj
@if exist *.lib -$(DEL) *.lib
@if exist *.dll -$(DEL) *.dll
@for %f in ($(DEMOS)) do @if exist %f -$(DEL) %f
@if exist *.err -$(DEL) *.err
@if exist *.map -$(DEL) *.map
@if exist *.res -$(DEL) *.res
@if exist *.lbc -$(DEL) *.lbc