diff --git a/demos/Makefile.in b/demos/Makefile.in index f8e735b1..1b17f268 100644 --- a/demos/Makefile.in +++ b/demos/Makefile.in @@ -102,7 +102,7 @@ realclean: distclean # This section provides for compiling and linking the # ncurses test programs. # -ncurses_testdir=/home/mark/ncurses-1.9.6/test +ncurses_testdir=$(HOME)/ncurses-5.5/test NCURSES_TESTS = \ bs \ @@ -117,6 +117,11 @@ NCURSES_TESTS = \ ncurses_tests: $(NCURSES_TESTS) +ncurses_clean: + -rm -rf *.o trace $(NCURSES_TESTS) + +NCFLAGS=-I$(ncurses_testdir) + bs: bs.o $(LIBXCURSES) $(LINK) bs.o -o $@ $(LDFLAGS) @@ -141,35 +146,35 @@ view: view.o $(LIBXCURSES) worm: worm.o $(LIBXCURSES) $(LINK) worm.o -o $@ $(LDFLAGS) -ncurses: ncurses.o $(LIBXCURSES) - $(LINK) ncurses.o -o $@ $(LDFLAGS) +ncurses: ncurses.o $(LIBXCURSES) $(LIBPANEL) + $(LINK) ncurses.o -o $@ $(LDFLAGS) $(LIBPANEL) bs.o: $(ncurses_testdir)/bs.c $(PDCURSES_CURSES_H) - $(CC) $(CCFLAGS) -o $@ $(ncurses_testdir)/bs.c + $(CC) $(CCFLAGS) $(NCFLAGS) -o $@ $(ncurses_testdir)/bs.c gdc.o: $(ncurses_testdir)/gdc.c $(PDCURSES_CURSES_H) - $(CC) $(CCFLAGS) -o $@ $(ncurses_testdir)/gdc.c + $(CC) $(CCFLAGS) $(NCFLAGS) -o $@ $(ncurses_testdir)/gdc.c hanoi.o: $(ncurses_testdir)/hanoi.c $(PDCURSES_CURSES_H) - $(CC) $(CCFLAGS) -o $@ $(ncurses_testdir)/hanoi.c + $(CC) $(CCFLAGS) $(NCFLAGS) -o $@ $(ncurses_testdir)/hanoi.c knight.o: $(ncurses_testdir)/knight.c $(PDCURSES_CURSES_H) - $(CC) $(CCFLAGS) -o $@ $(ncurses_testdir)/knight.c + $(CC) $(CCFLAGS) $(NCFLAGS) -o $@ $(ncurses_testdir)/knight.c rain.o: $(ncurses_testdir)/rain.c $(PDCURSES_CURSES_H) - $(CC) $(CCFLAGS) -o $@ $(ncurses_testdir)/rain.c + $(CC) $(CCFLAGS) $(NCFLAGS) -o $@ $(ncurses_testdir)/rain.c tclock.o: $(ncurses_testdir)/tclock.c $(PDCURSES_CURSES_H) - $(CC) $(CCFLAGS) -o $@ $(ncurses_testdir)/tclock.c + $(CC) $(CCFLAGS) $(NCFLAGS) -o $@ $(ncurses_testdir)/tclock.c view.o: $(ncurses_testdir)/view.c $(PDCURSES_CURSES_H) - $(CC) $(CCFLAGS) -o $@ $(ncurses_testdir)/view.c + $(CC) $(CCFLAGS) $(NCFLAGS) -o $@ $(ncurses_testdir)/view.c worm.o: $(ncurses_testdir)/worm.c $(PDCURSES_CURSES_H) - $(CC) $(CCFLAGS) -o $@ $(ncurses_testdir)/worm.c + $(CC) $(CCFLAGS) $(NCFLAGS) -o $@ $(ncurses_testdir)/worm.c ncurses.o: $(ncurses_testdir)/ncurses.c $(PDCURSES_CURSES_H) - $(CC) $(CCFLAGS) -o $@ $(ncurses_testdir)/ncurses.c + $(CC) $(CCFLAGS) $(NCFLAGS) -o $@ $(ncurses_testdir)/ncurses.c # # This section provides for compiling and linking the diff --git a/demos/ncurses_cfg.h b/demos/ncurses_cfg.h new file mode 100644 index 00000000..a483adde --- /dev/null +++ b/demos/ncurses_cfg.h @@ -0,0 +1,30 @@ +/* This file is only used with the ncurses test programs. + * + * Have ncurses-5.5 unpacked in your $(HOME) (you don't need to build + * it), or edit ncurses_testdir appropriately in the Makefile. Configure + * and build XCurses. (Sorry, other ports won't work yet.) Change to + * this directory, and: + * + * "make ncurses_tests" to start. + * "make ncurses_clean" when you're done. + * + * Builds: bs gdc hanoi knight rain tclock worm ncurses view + */ + +#include "../config.h" +#include + +#define ExitProgram XCursesExit(),exit + +#define HAVE_GETNSTR 1 +#define HAVE_GETTIMEOFDAY 1 +#define HAVE_PANEL_H 1 +#define HAVE_LIBPANEL 1 + +/* Some functions we don't have */ + +#define getwin(a) ((WINDOW *)(NULL)) +#define putwin(a,b) (ERR) + +int tigetnum(const char *capname) { return -2; } +int wchgat(WINDOW *win, int n, attr_t attr, short color, const void *opts) { return ERR; }