1 # Makefile for PDCurses library for X11
11 srcdir = $(PDCURSES_SRCDIR
)/pdcurses
12 demodir
= $(PDCURSES_SRCDIR
)/demos
14 PDCURSES_CONFIG_H
=$(PDCURSES_SRCDIR
)/config.h
15 PDCURSES_CURSES_H
=$(PDCURSES_SRCDIR
)/curses.h
16 PDCURSES_CURSPRIV_H
=$(PDCURSES_SRCDIR
)/curspriv.h
17 PDCURSES_HEADERS
=$(PDCURSES_CONFIG_H
) $(PDCURSES_CURSES_H
) \
18 $(PDCURSES_CURSPRIV_H
)
19 PDCURSES_X11_H
=$(osdir
)/pdcx11.h
23 LD_RXLIB1
= @LD_RXLIB1@
24 LD_RXLIB2
= @MH_XLIBS@ @MH_EXTRA_LIBS@
-lc
28 CPPFLAGS
= @DEFS@
-DXCURSES @SYS_DEFS@
-I
$(PDCURSES_SRCDIR
)
30 BUILD
= @CC@
-c
$(CFLAGS
) $(CPPFLAGS
) @MH_XINC_DIR@
31 DYN_BUILD
= @O2SAVE@
$(BUILD
) @DYN_COMP@ @CC2O@
34 #LDFLAGS = $(LIB_DEPS) @LDFLAGS@ @LIBS@ @MH_XLIBS@ @MH_EXTRA_LIBS@
35 LDFLAGS
= $(LIBCURSES
) @LDFLAGS@ @LIBS@ @MH_XLIBS@ @MH_EXTRA_LIBS@
39 LIBCURSES
= libXCurses.a
41 LIB_DEPS
= -L
$(PDCURSES_SRCDIR
)/x11
-lXCurses
43 PDCLIBS
= $(LIBCURSES
) @SHL_TARGETS@
45 DEMOS
= firework newdemo ptest rain testcurs tuidemo worm xmas
46 DEMOOBJS
= firework.o newdemo.o ptest.o rain.o testcurs.o tui.o \
47 tuidemo.o worm.o xmas.o
51 all: $(PDCLIBS
) $(DEMOS
)
54 echo Does nothing at the moment
57 -rm -rf
*.o
*.sho trace
$(PDCLIBS
) $(DEMOS
)
68 LIBOBJS
= addch.o addchstr.o addstr.o attr.o beep.o bkgd.o border.o \
69 clear.o color.o delch.o deleteln.o deprec.o getch.o getstr.o getyx.o \
70 inch.o inchstr.o initscr.o inopts.o insch.o insstr.o instr.o kernel.o \
71 keyname.o mouse.o move.o outopts.o overlay.o pad.o panel.o printw.o \
72 refresh.o scanw.o scr_dump.o scroll.o slk.o termattr.o terminfo.o \
73 touch.o util.o window.o debug.o
75 PDCOBJS
= pdcclip.o pdcdisp.o pdcgetsc.o pdckbd.o pdcscrn.o pdcsetsc.o \
76 pdcutil.o pdcx11.o x11.o sb.o ScrollBox.o
78 LIBSHOBJS
= $(LIBOBJS
:.o
=.sho
)
79 PDCSHOBJS
= $(PDCOBJS
:.o
=.sho
)
81 SHOFILES
= $(LIBSHOBJS
) $(PDCSHOBJS
)
83 $(LIBCURSES
) : $(LIBOBJS
) $(PDCOBJS
)
87 $(SHLPRE
)$(SHLFILE
)$(SHLPST
) : $(SHOFILES
)
88 $(LD_RXLIB1
) -o
$@
$(SHOFILES
) $(LD_RXLIB2
)
90 $(LIBOBJS
) $(PDCOBJS
) $(SHOFILES
) : $(PDCURSES_HEADERS
)
91 $(PDCOBJS
) $(PDCSHOBJS
) : $(PDCURSES_X11_H
)
92 $(DEMOOBJS
) : $(PDCURSES_CURSES_H
)
93 $(DEMOS
) : $(LIBCURSES
)
94 terminfo.o terminfo.sho
: $(TERM_HEADER
)
96 addch.o
: $(srcdir)/addch.c
97 $(BUILD
) $(srcdir)/addch.c
99 addchstr.o
: $(srcdir)/addchstr.c
100 $(BUILD
) $(srcdir)/addchstr.c
102 addstr.o
: $(srcdir)/addstr.c
103 $(BUILD
) $(srcdir)/addstr.c
105 attr.o
: $(srcdir)/attr.c
106 $(BUILD
) $(srcdir)/attr.c
108 beep.o
: $(srcdir)/beep.c
109 $(BUILD
) $(srcdir)/beep.c
111 bkgd.o
: $(srcdir)/bkgd.c
112 $(BUILD
) $(srcdir)/bkgd.c
114 border.o
: $(srcdir)/border.c
115 $(BUILD
) $(srcdir)/border.c
117 clear.o
: $(srcdir)/clear.c
118 $(BUILD
) $(srcdir)/clear.c
120 color.o
: $(srcdir)/color.c
121 $(BUILD
) $(srcdir)/color.c
123 delch.o
: $(srcdir)/delch.c
124 $(BUILD
) $(srcdir)/delch.c
126 deleteln.o
: $(srcdir)/deleteln.c
127 $(BUILD
) $(srcdir)/deleteln.c
129 deprec.o
: $(srcdir)/deprec.c
130 $(BUILD
) $(srcdir)/deprec.c
132 getch.o
: $(srcdir)/getch.c
133 $(BUILD
) $(srcdir)/getch.c
135 getstr.o
: $(srcdir)/getstr.c
136 $(BUILD
) $(srcdir)/getstr.c
138 getyx.o
: $(srcdir)/getyx.c
139 $(BUILD
) $(srcdir)/getyx.c
141 inch.o
: $(srcdir)/inch.c
142 $(BUILD
) $(srcdir)/inch.c
144 inchstr.o
: $(srcdir)/inchstr.c
145 $(BUILD
) $(srcdir)/inchstr.c
147 initscr.o
: $(srcdir)/initscr.c
148 $(BUILD
) $(srcdir)/initscr.c
150 inopts.o
: $(srcdir)/inopts.c
151 $(BUILD
) $(srcdir)/inopts.c
153 insch.o
: $(srcdir)/insch.c
154 $(BUILD
) $(srcdir)/insch.c
156 insstr.o
: $(srcdir)/insstr.c
157 $(BUILD
) $(srcdir)/insstr.c
159 instr.o
: $(srcdir)/instr.c
160 $(BUILD
) $(srcdir)/instr.c
162 kernel.o
: $(srcdir)/kernel.c
163 $(BUILD
) $(srcdir)/kernel.c
165 keyname.o
: $(srcdir)/keyname.c
166 $(BUILD
) $(srcdir)/keyname.c
168 mouse.o
: $(srcdir)/mouse.c
169 $(BUILD
) $(srcdir)/mouse.c
171 move.o
: $(srcdir)/move.c
172 $(BUILD
) $(srcdir)/move.c
174 outopts.o
: $(srcdir)/outopts.c
175 $(BUILD
) $(srcdir)/outopts.c
177 overlay.o
: $(srcdir)/overlay.c
178 $(BUILD
) $(srcdir)/overlay.c
180 pad.o
: $(srcdir)/pad.c
181 $(BUILD
) $(srcdir)/pad.c
183 panel.o
: $(srcdir)/panel.c
$(PDCURSES_SRCDIR
)/panel.h
184 $(BUILD
) $(srcdir)/panel.c
186 printw.o
: $(srcdir)/printw.c
187 $(BUILD
) $(srcdir)/printw.c
189 refresh.o
: $(srcdir)/refresh.c
190 $(BUILD
) $(srcdir)/refresh.c
192 scanw.o
: $(srcdir)/scanw.c
193 $(BUILD
) $(srcdir)/scanw.c
195 scr_dump.o
: $(srcdir)/scr_dump.c
196 $(BUILD
) $(srcdir)/scr_dump.c
198 scroll.o
: $(srcdir)/scroll.c
199 $(BUILD
) $(srcdir)/scroll.c
201 slk.o
: $(srcdir)/slk.c
202 $(BUILD
) $(srcdir)/slk.c
204 termattr.o
: $(srcdir)/termattr.c
205 $(BUILD
) $(srcdir)/termattr.c
207 terminfo.o
: $(srcdir)/terminfo.c
208 $(BUILD
) $(srcdir)/terminfo.c
210 touch.o
: $(srcdir)/touch.c
211 $(BUILD
) $(srcdir)/touch.c
213 util.o
: $(srcdir)/util.c
214 $(BUILD
) $(srcdir)/util.c
216 window.o
: $(srcdir)/window.c
217 $(BUILD
) $(srcdir)/window.c
219 debug.o
: $(srcdir)/debug.c
220 $(BUILD
) $(srcdir)/debug.c
222 pdcclip.o
: $(osdir
)/pdcclip.c
223 $(BUILD
) $(osdir
)/pdcclip.c
225 pdcdisp.o
: $(osdir
)/pdcdisp.c
226 $(BUILD
) $(osdir
)/pdcdisp.c
228 pdcgetsc.o
: $(osdir
)/pdcgetsc.c
229 $(BUILD
) $(osdir
)/pdcgetsc.c
231 pdckbd.o
: $(osdir
)/pdckbd.c
232 $(BUILD
) $(osdir
)/pdckbd.c
234 pdcscrn.o
: $(osdir
)/pdcscrn.c
235 $(BUILD
) $(osdir
)/pdcscrn.c
237 pdcsetsc.o
: $(osdir
)/pdcsetsc.c
238 $(BUILD
) $(osdir
)/pdcsetsc.c
240 pdcutil.o
: $(osdir
)/pdcutil.c
241 $(BUILD
) $(osdir
)/pdcutil.c
243 pdcx11.o
: $(osdir
)/pdcx11.c
244 $(BUILD
) $(osdir
)/pdcx11.c
246 ScrollBox.o
: $(osdir
)/ScrollBox.c
247 $(BUILD
) $(osdir
)/ScrollBox.c
250 $(BUILD
) $(osdir
)/sb.c
252 x11.o
: $(osdir
)/x11.c
253 $(BUILD
) $(osdir
)/x11.c
255 addch.sho
: $(srcdir)/addch.c
256 $(DYN_BUILD
) $(srcdir)/addch.c
259 addchstr.sho
: $(srcdir)/addchstr.c
260 $(DYN_BUILD
) $(srcdir)/addchstr.c
263 addstr.sho
: $(srcdir)/addstr.c
264 $(DYN_BUILD
) $(srcdir)/addstr.c
267 attr.sho
: $(srcdir)/attr.c
268 $(DYN_BUILD
) $(srcdir)/attr.c
271 beep.sho
: $(srcdir)/beep.c
272 $(DYN_BUILD
) $(srcdir)/beep.c
275 bkgd.sho
: $(srcdir)/bkgd.c
276 $(DYN_BUILD
) $(srcdir)/bkgd.c
279 border.sho
: $(srcdir)/border.c
280 $(DYN_BUILD
) $(srcdir)/border.c
283 clear.sho
: $(srcdir)/clear.c
284 $(DYN_BUILD
) $(srcdir)/clear.c
287 color.sho
: $(srcdir)/color.c
288 $(DYN_BUILD
) $(srcdir)/color.c
291 delch.sho
: $(srcdir)/delch.c
292 $(DYN_BUILD
) $(srcdir)/delch.c
295 deleteln.sho
: $(srcdir)/deleteln.c
296 $(DYN_BUILD
) $(srcdir)/deleteln.c
299 deprec.sho
: $(srcdir)/deprec.c
300 $(DYN_BUILD
) $(srcdir)/deprec.c
303 getch.sho
: $(srcdir)/getch.c
304 $(DYN_BUILD
) $(srcdir)/getch.c
307 getstr.sho
: $(srcdir)/getstr.c
308 $(DYN_BUILD
) $(srcdir)/getstr.c
311 getyx.sho
: $(srcdir)/getyx.c
312 $(DYN_BUILD
) $(srcdir)/getyx.c
315 inch.sho
: $(srcdir)/inch.c
316 $(DYN_BUILD
) $(srcdir)/inch.c
319 inchstr.sho
: $(srcdir)/inchstr.c
320 $(DYN_BUILD
) $(srcdir)/inchstr.c
323 initscr.sho
: $(srcdir)/initscr.c
324 $(DYN_BUILD
) $(srcdir)/initscr.c
327 inopts.sho
: $(srcdir)/inopts.c
328 $(DYN_BUILD
) $(srcdir)/inopts.c
331 insch.sho
: $(srcdir)/insch.c
332 $(DYN_BUILD
) $(srcdir)/insch.c
335 insstr.sho
: $(srcdir)/insstr.c
336 $(DYN_BUILD
) $(srcdir)/insstr.c
339 instr.sho
: $(srcdir)/instr.c
340 $(DYN_BUILD
) $(srcdir)/instr.c
343 kernel.sho
: $(srcdir)/kernel.c
344 $(DYN_BUILD
) $(srcdir)/kernel.c
347 keyname.sho
: $(srcdir)/keyname.c
348 $(DYN_BUILD
) $(srcdir)/keyname.c
351 mouse.sho
: $(srcdir)/mouse.c
352 $(DYN_BUILD
) $(srcdir)/mouse.c
355 move.sho
: $(srcdir)/move.c
356 $(DYN_BUILD
) $(srcdir)/move.c
359 outopts.sho
: $(srcdir)/outopts.c
360 $(DYN_BUILD
) $(srcdir)/outopts.c
363 overlay.sho
: $(srcdir)/overlay.c
364 $(DYN_BUILD
) $(srcdir)/overlay.c
367 pad.sho
: $(srcdir)/pad.c
368 $(DYN_BUILD
) $(srcdir)/pad.c
371 panel.sho
: $(srcdir)/panel.c
$(PDCURSES_SRCDIR
)/panel.h
372 $(DYN_BUILD
) $(srcdir)/panel.c
375 printw.sho
: $(srcdir)/printw.c
376 $(DYN_BUILD
) $(srcdir)/printw.c
379 refresh.sho
: $(srcdir)/refresh.c
380 $(DYN_BUILD
) $(srcdir)/refresh.c
383 scanw.sho
: $(srcdir)/scanw.c
384 $(DYN_BUILD
) $(srcdir)/scanw.c
387 scr_dump.sho
: $(srcdir)/scr_dump.c
388 $(DYN_BUILD
) $(srcdir)/scr_dump.c
391 scroll.sho
: $(srcdir)/scroll.c
392 $(DYN_BUILD
) $(srcdir)/scroll.c
395 slk.sho
: $(srcdir)/slk.c
396 $(DYN_BUILD
) $(srcdir)/slk.c
399 termattr.sho
: $(srcdir)/termattr.c
400 $(DYN_BUILD
) $(srcdir)/termattr.c
403 terminfo.sho
: $(srcdir)/terminfo.c
404 $(DYN_BUILD
) $(srcdir)/terminfo.c
407 touch.sho
: $(srcdir)/touch.c
408 $(DYN_BUILD
) $(srcdir)/touch.c
411 util.sho
: $(srcdir)/util.c
412 $(DYN_BUILD
) $(srcdir)/util.c
415 window.sho
: $(srcdir)/window.c
416 $(DYN_BUILD
) $(srcdir)/window.c
419 debug.sho
: $(srcdir)/debug.c
420 $(DYN_BUILD
) $(srcdir)/debug.c
423 pdcclip.sho
: $(osdir
)/pdcclip.c
424 $(DYN_BUILD
) $(osdir
)/pdcclip.c
427 pdcdisp.sho
: $(osdir
)/pdcdisp.c
428 $(DYN_BUILD
) $(osdir
)/pdcdisp.c
431 pdcgetsc.sho
: $(osdir
)/pdcgetsc.c
432 $(DYN_BUILD
) $(osdir
)/pdcgetsc.c
435 pdckbd.sho
: $(osdir
)/pdckbd.c
436 $(DYN_BUILD
) $(osdir
)/pdckbd.c
439 pdcscrn.sho
: $(osdir
)/pdcscrn.c
440 $(DYN_BUILD
) $(osdir
)/pdcscrn.c
443 pdcsetsc.sho
: $(osdir
)/pdcsetsc.c
444 $(DYN_BUILD
) $(osdir
)/pdcsetsc.c
447 pdcutil.sho
: $(osdir
)/pdcutil.c
448 $(DYN_BUILD
) $(osdir
)/pdcutil.c
451 pdcx11.sho
: $(osdir
)/pdcx11.c
452 $(DYN_BUILD
) $(osdir
)/pdcx11.c
455 ScrollBox.sho
: $(osdir
)/ScrollBox.c
456 $(DYN_BUILD
) $(osdir
)/ScrollBox.c
459 sb.sho
: $(osdir
)/sb.c
460 $(DYN_BUILD
) $(osdir
)/sb.c
463 x11.sho
: $(osdir
)/x11.c
464 $(DYN_BUILD
) $(osdir
)/x11.c
468 $(LINK
) firework.o
-o
$@
$(LDFLAGS
)
471 $(LINK
) newdemo.o
-o
$@
$(LDFLAGS
)
474 $(LINK
) ptest.o
-o
$@
$(LDFLAGS
)
477 $(LINK
) rain.o
-o
$@
$(LDFLAGS
)
480 $(LINK
) testcurs.o
-o
$@
$(LDFLAGS
)
482 tuidemo
: tuidemo.o tui.o
483 $(LINK
) tui.o tuidemo.o
-o
$@
$(LDFLAGS
)
486 $(LINK
) worm.o
-o
$@
$(LDFLAGS
)
489 $(LINK
) xmas.o
-o
$@
$(LDFLAGS
)
491 firework.o
: $(demodir
)/firework.c
492 $(BUILD
) $(demodir
)/firework.c
494 newdemo.o
: $(demodir
)/newdemo.c
495 $(BUILD
) $(demodir
)/newdemo.c
497 ptest.o
: $(demodir
)/ptest.c
$(PDCURSES_SRCDIR
)/panel.h
498 $(BUILD
) $(demodir
)/ptest.c
500 rain.o
: $(demodir
)/rain.c
501 $(BUILD
) $(demodir
)/rain.c
503 testcurs.o
: $(demodir
)/testcurs.c
504 $(BUILD
) $(demodir
)/testcurs.c
506 tui.o
: $(demodir
)/tui.c
$(demodir
)/tui.h
507 $(BUILD
) $(demodir
)/tui.c
509 tuidemo.o
: $(demodir
)/tuidemo.c
510 $(BUILD
) $(demodir
)/tuidemo.c
512 worm.o
: $(demodir
)/worm.c
513 $(BUILD
) $(demodir
)/worm.c
515 xmas.o
: $(demodir
)/xmas.c
516 $(BUILD
) $(demodir
)/xmas.c
518 # This section provides for compiling and linking the
519 # ncurses test programs.
521 ncurses_testdir
= $(HOME
)/ncurses-5.6
/test
523 NCURSES_TESTS
= bs gdc hanoi knight tclock ncurses
525 ncurses_tests
: $(NCURSES_TESTS
)
528 -rm -f
*.o trace
$(NCURSES_TESTS
)
530 NCFLAGS
= -I.
-I
$(ncurses_testdir
)
532 bs
: bs.o
$(LIBCURSES
)
533 $(LINK
) bs.o
-o
$@
$(LDFLAGS
)
535 gdc
: gdc.o
$(LIBCURSES
)
536 $(LINK
) gdc.o
-o
$@
$(LDFLAGS
)
538 hanoi
: hanoi.o
$(LIBCURSES
)
539 $(LINK
) hanoi.o
-o
$@
$(LDFLAGS
)
541 knight
: knight.o
$(LIBCURSES
)
542 $(LINK
) knight.o
-o
$@
$(LDFLAGS
)
544 tclock
: tclock.o
$(LIBCURSES
)
545 $(LINK
) tclock.o
-o
$@
$(LDFLAGS
) -lm
547 view
: view.o
$(LIBCURSES
)
548 $(LINK
) view.o
-o
$@
$(LDFLAGS
)
550 ncurses
: ncurses.o
$(LIBCURSES
)
551 $(LINK
) ncurses.o
-o
$@
$(LDFLAGS
)
553 bs.o
: $(ncurses_testdir
)/bs.c
$(PDCURSES_CURSES_H
)
554 $(BUILD
) $(NCFLAGS
) $(ncurses_testdir
)/bs.c
556 gdc.o
: $(ncurses_testdir
)/gdc.c
$(PDCURSES_CURSES_H
)
557 $(BUILD
) $(NCFLAGS
) $(ncurses_testdir
)/gdc.c
559 hanoi.o
: $(ncurses_testdir
)/hanoi.c
$(PDCURSES_CURSES_H
)
560 $(BUILD
) $(NCFLAGS
) $(ncurses_testdir
)/hanoi.c
562 knight.o
: $(ncurses_testdir
)/knight.c
$(PDCURSES_CURSES_H
)
563 $(BUILD
) $(NCFLAGS
) $(ncurses_testdir
)/knight.c
565 tclock.o
: $(ncurses_testdir
)/tclock.c
$(PDCURSES_CURSES_H
)
566 $(BUILD
) $(NCFLAGS
) $(ncurses_testdir
)/tclock.c
568 view.o
: $(ncurses_testdir
)/view.c
$(PDCURSES_CURSES_H
)
569 $(BUILD
) $(NCFLAGS
) $(ncurses_testdir
)/view.c
571 ncurses.o
: $(ncurses_testdir
)/ncurses.c
$(PDCURSES_CURSES_H
)
572 $(BUILD
) $(NCFLAGS
) $(ncurses_testdir
)/ncurses.c