1 # Makefile for PDCurses library - WIN32 Digital Mars
3 # Usage: make -f dmcwin32.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
-o
+space
-Nc
27 CPPFLAGS
= -I
$(PDCURSES_SRCDIR
) #-DPDC_WIDE -DPDC_FORCE_UTF8
32 LIBCURSES
= pdcurses.lib
34 BUILD
= $(CC
) $(CFLAGS
) $(CPPFLAGS
)
36 DEMOS
= testcurs.exe newdemo.exe xmas.exe tuidemo.exe \
37 firework.exe ptest.exe rain.exe worm.exe
39 all: $(LIBCURSES
) $(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
) -c
$@
$(LIBOBJS
) $(PDCOBJS
)
72 -copy
$(LIBCURSES
) panel.lib
74 SRCBUILD
= $(BUILD
) $(srcdir)\
$*.c
75 OSBUILD
= $(BUILD
) $(osdir
)\
$*.c
76 DEMOBUILD
= $(LINK
) $(CPPFLAGS
) -o
+space
$@
$**
78 addch.obj
: $(srcdir)\addch.c
81 addchstr.obj
: $(srcdir)\addchstr.c
84 addstr.obj
: $(srcdir)\addstr.c
87 attr.obj
: $(srcdir)\attr.c
90 beep.obj
: $(srcdir)\beep.c
93 bkgd.obj
: $(srcdir)\bkgd.c
96 border.obj
: $(srcdir)\border.c
99 clear.obj
: $(srcdir)\clear.c
102 color.obj
: $(srcdir)\color.c
105 delch.obj
: $(srcdir)\delch.c
108 deleteln.obj
: $(srcdir)\deleteln.c
111 deprec.obj
: $(srcdir)\deprec.c
114 getch.obj
: $(srcdir)\getch.c
117 getstr.obj
: $(srcdir)\getstr.c
120 getyx.obj
: $(srcdir)\getyx.c
123 inch.obj
: $(srcdir)\inch.c
126 inchstr.obj
: $(srcdir)\inchstr.c
129 initscr.obj
: $(srcdir)\initscr.c
132 inopts.obj
: $(srcdir)\inopts.c
135 insch.obj
: $(srcdir)\insch.c
138 insstr.obj
: $(srcdir)\insstr.c
141 instr.obj
: $(srcdir)\instr.c
144 kernel.obj
: $(srcdir)\kernel.c
147 keyname.obj
: $(srcdir)\keyname.c
150 mouse.obj
: $(srcdir)\mouse.c
153 move.obj
: $(srcdir)\move.c
156 outopts.obj
: $(srcdir)\outopts.c
159 overlay.obj
: $(srcdir)\overlay.c
162 pad.obj
: $(srcdir)\pad.c
165 panel.obj
: $(srcdir)\panel.c
168 printw.obj
: $(srcdir)\printw.c
171 refresh.obj
: $(srcdir)\refresh.c
174 scanw.obj
: $(srcdir)\scanw.c
177 scr_dump.obj
: $(srcdir)\scr_dump.c
180 scroll.obj
: $(srcdir)\scroll.c
183 slk.obj
: $(srcdir)\slk.c
186 termattr.obj
: $(srcdir)\termattr.c
189 terminfo.obj
: $(srcdir)\terminfo.c
192 touch.obj
: $(srcdir)\touch.c
195 util.obj
: $(srcdir)\util.c
198 window.obj
: $(srcdir)\window.c
201 debug.obj
: $(srcdir)\debug.c
204 pdcclip.obj
: $(osdir
)\pdcclip.c
207 pdcdisp.obj
: $(osdir
)\pdcdisp.c
210 pdcgetsc.obj
: $(osdir
)\pdcgetsc.c
213 pdckbd.obj
: $(osdir
)\pdckbd.c
216 pdcscrn.obj
: $(osdir
)\pdcscrn.c
219 pdcsetsc.obj
: $(osdir
)\pdcsetsc.c
222 pdcutil.obj
: $(osdir
)\pdcutil.c
225 firework.exe
: $(demodir
)\firework.c
228 newdemo.exe
: $(demodir
)\newdemo.c
231 ptest.exe
: $(demodir
)\ptest.c
234 rain.exe
: $(demodir
)\rain.c
237 testcurs.exe
: $(demodir
)\testcurs.c
238 $(DEMOBUILD
) advapi32.lib
240 tuidemo.exe
: tuidemo.obj tui.obj
243 worm.exe
: $(demodir
)\worm.c
246 xmas.exe
: $(demodir
)\xmas.c
249 tui.obj
: $(demodir
)\tui.c
$(demodir
)\tui.h
250 $(BUILD
) -I
$(demodir
) $(demodir
)\
$*.c
252 tuidemo.obj
: $(demodir
)\tuidemo.c
253 $(BUILD
) -I
$(demodir
) $(demodir
)\
$*.c