1
0
mirror of https://github.com/abakh/nbsdgames.git synced 2025-02-02 15:07:27 -05:00

some games build on plan9

This commit is contained in:
Jens Staal 2020-06-07 06:59:29 +02:00
parent dccab31462
commit d7463823d6
2 changed files with 14 additions and 17 deletions

View File

@ -304,7 +304,7 @@ void sigint_handler(int x){
puts("Quit."); puts("Quit.");
exit(x); exit(x);
} }
int main(void){ void main(void){
signal(SIGINT,sigint_handler); signal(SIGINT,sigint_handler);
initscr(); initscr();
noecho(); noecho();
@ -394,7 +394,7 @@ int main(void){
if(!hooknum) if(!hooknum)
break; break;
if(input!=ERR){ if(input!=ERR){
usleep(100000); sleep(1);
flushinp(); flushinp();
} }
} }

View File

@ -1,35 +1,32 @@
APE=/sys/src/ape APE=/sys/src/ape
<$APE/config <$APE/config
#comment out all that depend on variable size arrays
TARG=\ TARG=\
battleship \ battleship \
checkers \ checkers \
fifteen \ # fifteen \
fisher \ fisher \
jewels \ jewels \
memoblocks \ # memoblocks \
miketron \ # miketron \
mines \ # mines \
muncher \ # muncher \
pipes \ # pipes \
rabbithole \ # rabbithole \
redsquare \ redsquare \
reversi \ reversi \
sos \ # sos \
sudoku # sudoku
HFILES=\ BIN=/$objtype/bin/games
/sys/include/ape/curses.h\
/sys/include/ape/panel.h\
UPDATE=\ UPDATE=\
mkfile\ mkfile\
$HFILES\
${OFILES:%.$O=%.c}\ ${OFILES:%.$O=%.c}\
/$objtype/ape/lib/libcurses.a
</sys/src/cmd/mkmany </sys/src/cmd/mkmany
CFLAGS= -c -D_POSIX_SOURCE -D_BSD_EXTENSION -DPlan9 CFLAGS= -c -D_POSIX_SOURCE -D_BSD_EXTENSION -DPlan9 -Ddraw=nb_draw
$O.out: /$objtype/lib/ape/libcurses.a $O.out: /$objtype/lib/ape/libcurses.a