Skip to content

Commit

Permalink
Update mkfile (#318)
Browse files Browse the repository at this point in the history
Plan9 changes : added -D_HAVE_GETTIMEOFDAY to successfully include <sys/time.h> for the 'milliseconds elapsed' function.

Update mkfile - add term.h

terminfo / term.h now installed

added some new demo tests to mkfile
  • Loading branch information
staalmannen authored Apr 13, 2024
1 parent bd28e7f commit 1e8472c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pdcurses/getch.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ use clock_gettime() or gettimeofday() when available. */
#if defined( _POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 199309L)
#define CLOCK_GETTIME_AVAILABLE 1
#endif
#if defined( _DEFAULT_SOURCE) || defined( _BSD_SOURCE)
#if defined( _DEFAULT_SOURCE) || defined( _BSD_SOURCE) || defined(HAVE_GETTIMEOFDAY)
#define GETTIMEOFDAY_AVAILABLE 1
#endif

Expand Down
6 changes: 4 additions & 2 deletions plan9/mkfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ OFILES=\
HFILES=\
/sys/include/ape/curses.h\
/sys/include/ape/panel.h\
/sys/include/ape/term.h

UPDATE=\
mkfile\
Expand All @@ -69,7 +70,7 @@ UPDATE=\
CC=pcc
LD=pcc
CFLAGS= -c -I. -I.. -D_POSIX_SOURCE -D_BSD_EXTENSION -D_C99_SNPRINTF_EXTENSION \
-DHAVE_VSNPRINTF
-DHAVE_VSNPRINTF -DHAVE_GETTIMEOFDAY

%.$O: ../pdcurses/%.c
$CC $CFLAGS ../pdcurses/$stem.c
Expand All @@ -79,10 +80,11 @@ CFLAGS= -c -I. -I.. -D_POSIX_SOURCE -D_BSD_EXTENSION -D_C99_SNPRINTF_EXTENSION \


install:V:
cp libcurses.a /$objtype/lib/ape/libcurses.a
cp ../curses.h /sys/include/ape/curses.h
ape/patch /sys/include/ape/curses.h <header.patch
cp ../panel.h /sys/include/ape/panel.h
cp ../term.h /sys/include/ape/term.h
cp libcurses.a /$objtype/lib/ape/libcurses.a

demos:V:
@{
Expand Down
8 changes: 7 additions & 1 deletion plan9/mkfile_demo
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,23 @@ APE=/sys/src/ape
<$APE/config

TARG=\
calendar\
firework\
init_col\
mbrot\
newtest\
ozdemo\
picsview\
ptest\
rain\
speed\
test_pan\
testcurs\
tuidemo\
version\
widetest\
worm\
xmas\
xmas

HFILES=\
/sys/include/ape/curses.h\
Expand Down

0 comments on commit 1e8472c

Please sign in to comment.