1 # Makefile for PDCurses library - WIN32 LCC-Win32
3 # Usage: make -f lccwin32.mak [target]
5 # where target can be any of:
6 # [all|demos|pdcurses.lib|testcurs.exe...]
10 PDCURSES_CURSES_H
= $(PDCURSES_SRCDIR
)\curses.h
11 PDCURSES_CURSPRIV_H
= $(PDCURSES_SRCDIR
)\curspriv.h
12 PDCURSES_HEADERS
= $(PDCURSES_CURSES_H
) $(PDCURSES_CURSPRIV_H
)
14 PANEL_HEADER
= $(PDCURSES_SRCDIR
)\panel.h
15 TERM_HEADER
= $(PDCURSES_SRCDIR
)\term.h
17 srcdir = $(PDCURSES_SRCDIR
)\pdcurses
18 osdir
= $(PDCURSES_SRCDIR
)\win32
19 demodir
= $(PDCURSES_SRCDIR
)\demos
21 PDCURSES_WIN_H
= $(osdir
)\pdcwin.h
25 #CFLAGS = -c -g3 -A -ansic
26 CFLAGS
= -c
-O
-A
-ansic
28 CPPFLAGS
= -I
$(PDCURSES_SRCDIR
) #-DPDC_WIDE -DPDC_FORCE_UTF8
33 LIBCURSES
= pdcurses.lib
35 BUILD
= $(CC
) $(CFLAGS
) $(CPPFLAGS
)
36 PDCLIBS
= $(LIBCURSES
)
38 DEMOS
= testcurs.exe newdemo.exe xmas.exe tuidemo.exe \
39 firework.exe ptest.exe rain.exe worm.exe
41 all: $(PDCLIBS
) $(DEMOS
)
48 LIBOBJS
= addch.obj addchstr.obj addstr.obj attr.obj beep.obj bkgd.obj \
49 border.obj clear.obj color.obj delch.obj deleteln.obj deprec.obj getch.obj \
50 getstr.obj getyx.obj inch.obj inchstr.obj initscr.obj inopts.obj \
51 insch.obj insstr.obj instr.obj kernel.obj keyname.obj mouse.obj move.obj \
52 outopts.obj overlay.obj pad.obj panel.obj printw.obj refresh.obj \
53 scanw.obj scr_dump.obj scroll.obj slk.obj termattr.obj terminfo.obj \
54 touch.obj util.obj window.obj debug.obj
56 PDCOBJS
= pdcclip.obj pdcdisp.obj pdcgetsc.obj pdckbd.obj pdcscrn.obj \
57 pdcsetsc.obj pdcutil.obj
59 DEMOOBJS
= testcurs.obj newdemo.obj xmas.obj tuidemo.obj tui.obj \
60 firework.obj ptest.obj rain.obj worm.obj
62 $(LIBOBJS
) $(PDCOBJS
) : $(PDCURSES_HEADERS
)
63 $(PDCOBJS
) : $(PDCURSES_WIN_H
)
64 panel.obj ptest.obj
: $(PANEL_HEADER
)
65 terminfo.obj
: $(TERM_HEADER
)
67 $(DEMOOBJS
) : $(PDCURSES_CURSES_H
)
68 $(DEMOS
) : $(LIBCURSES
)
70 $(LIBCURSES
) : $(LIBOBJS
) $(PDCOBJS
)
71 $(LIBEXE
) /out
:$@
$(LIBOBJS
) $(PDCOBJS
)
72 -copy
$(LIBCURSES
) panel.lib
74 SRCBUILD
= $(BUILD
) $(srcdir)\
$*.c
75 OSBUILD
= $(BUILD
) $(osdir
)\
$*.c
77 addch.obj
: $(srcdir)\addch.c
80 addchstr.obj
: $(srcdir)\addchstr.c
83 addstr.obj
: $(srcdir)\addstr.c
86 attr.obj
: $(srcdir)\attr.c
89 beep.obj
: $(srcdir)\beep.c
92 bkgd.obj
: $(srcdir)\bkgd.c
95 border.obj
: $(srcdir)\border.c
98 clear.obj
: $(srcdir)\clear.c
101 color.obj
: $(srcdir)\color.c
104 delch.obj
: $(srcdir)\delch.c
107 deleteln.obj
: $(srcdir)\deleteln.c
110 deprec.obj
: $(srcdir)\deprec.c
113 getch.obj
: $(srcdir)\getch.c
116 getstr.obj
: $(srcdir)\getstr.c
119 getyx.obj
: $(srcdir)\getyx.c
122 inch.obj
: $(srcdir)\inch.c
125 inchstr.obj
: $(srcdir)\inchstr.c
128 initscr.obj
: $(srcdir)\initscr.c
131 inopts.obj
: $(srcdir)\inopts.c
134 insch.obj
: $(srcdir)\insch.c
137 insstr.obj
: $(srcdir)\insstr.c
140 instr.obj
: $(srcdir)\instr.c
143 kernel.obj
: $(srcdir)\kernel.c
146 keyname.obj
: $(srcdir)\keyname.c
149 mouse.obj
: $(srcdir)\mouse.c
152 move.obj
: $(srcdir)\move.c
155 outopts.obj
: $(srcdir)\outopts.c
158 overlay.obj
: $(srcdir)\overlay.c
161 pad.obj
: $(srcdir)\pad.c
164 panel.obj
: $(srcdir)\panel.c
167 printw.obj
: $(srcdir)\printw.c
170 refresh.obj
: $(srcdir)\refresh.c
173 scanw.obj
: $(srcdir)\scanw.c
176 scr_dump.obj
: $(srcdir)\scr_dump.c
179 scroll.obj
: $(srcdir)\scroll.c
182 slk.obj
: $(srcdir)\slk.c
185 termattr.obj
: $(srcdir)\termattr.c
188 terminfo.obj
: $(srcdir)\terminfo.c
191 touch.obj
: $(srcdir)\touch.c
194 util.obj
: $(srcdir)\util.c
197 window.obj
: $(srcdir)\window.c
200 debug.obj
: $(srcdir)\debug.c
203 pdcclip.obj
: $(osdir
)\pdcclip.c
206 pdcdisp.obj
: $(osdir
)\pdcdisp.c
209 pdcgetsc.obj
: $(osdir
)\pdcgetsc.c
212 pdckbd.obj
: $(osdir
)\pdckbd.c
215 pdcscrn.obj
: $(osdir
)\pdcscrn.c
218 pdcsetsc.obj
: $(osdir
)\pdcsetsc.c
221 pdcutil.obj
: $(osdir
)\pdcutil.c
224 firework.exe
: firework.obj
225 $(LINK
) -o
$@ firework.obj
$(LIBCURSES
)
227 newdemo.exe
: newdemo.obj
228 $(LINK
) -o
$@ newdemo.obj
$(LIBCURSES
)
231 $(LINK
) -o
$@ ptest.obj
$(LIBCURSES
)
234 $(LINK
) -o
$@ rain.obj
$(LIBCURSES
)
236 testcurs.exe
: testcurs.obj
237 $(LINK
) -o
$@ testcurs.obj
$(LIBCURSES
)
239 tuidemo.exe
: tuidemo.obj tui.obj
240 $(LINK
) -o
$@ tuidemo.obj tui.obj
$(LIBCURSES
)
243 $(LINK
) -o
$@ worm.obj
$(LIBCURSES
)
246 $(LINK
) -o
$@ xmas.obj
$(LIBCURSES
)
248 firework.obj
: $(demodir
)\firework.c
249 $(BUILD
) $(demodir
)\
$*.c
251 newdemo.obj
: $(demodir
)\newdemo.c
252 $(BUILD
) $(demodir
)\
$*.c
254 ptest.obj
: $(demodir
)\ptest.c
255 $(BUILD
) $(demodir
)\
$*.c
257 rain.obj
: $(demodir
)\rain.c
258 $(BUILD
) $(demodir
)\
$*.c
260 testcurs.obj
: $(demodir
)\testcurs.c
261 $(BUILD
) $(demodir
)\
$*.c
263 tui.obj
: $(demodir
)\tui.c
$(demodir
)\tui.h
264 $(BUILD
) -I
$(demodir
) $(demodir
)\
$*.c
266 tuidemo.obj
: $(demodir
)\tuidemo.c
267 $(BUILD
) -I
$(demodir
) $(demodir
)\
$*.c
269 worm.obj
: $(demodir
)\worm.c
270 $(BUILD
) $(demodir
)\
$*.c
272 xmas.obj
: $(demodir
)\xmas.c
273 $(BUILD
) $(demodir
)\
$*.c