From 08eca96e71d96ad1f8e9b888875ab5570f208d19 Mon Sep 17 00:00:00 2001 From: Cameron Katri Date: Wed, 17 Feb 2021 14:05:02 -0500 Subject: Get all the games compiling for iOS --- larn/Makefile | 31 ++++++++++++++++--------------- larn/diag.c | 1 + larn/main.c | 2 ++ larn/scores.c | 2 ++ 4 files changed, 21 insertions(+), 15 deletions(-) (limited to 'larn') diff --git a/larn/Makefile b/larn/Makefile index cca697bb..643e1913 100644 --- a/larn/Makefile +++ b/larn/Makefile @@ -55,26 +55,27 @@ # NOLOG # Turn off logging. -.include - PROG= larn MAN= larn.6 -CPPFLAGS+=-DBSD -DVER=12 -DSUBVER=0 -DNONAP -DUIDSCORE -DTERMIOS +CPPFLAGS+=-DVER=12 -DSUBVER=0 -DNONAP -DUIDSCORE -DTERMIOS SRCS= main.c object.c create.c tok.c display.c global.c data.c io.c \ monster.c store.c diag.c help.c config.c nap.c bill.c scores.c \ signal.c action.c moreobj.c movem.c regen.c fortune.c savelev.c -DPADD= ${LIBTERMINFO} -LDADD= -lterminfo -HIDEGAME=hidegame -SETGIDGAME=yes +FILES= datfiles/larn.help datfiles/larnmaze datfiles/larnopts + +all: $(PROG) + +$(PROG): $(SRCS) + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $(PROG) $(SRCS) -lncursesw + $(STRIP) $(PROG) -.if ${MKSHARE} != "no" -DAT=larnmaze larnopts larn.help -FILES=${DAT:S@^@${.CURDIR}/datfiles/@g} -FILESDIR=/usr/share/games/larn -.endif +install: $(PROG) $(MAN) + $(GINSTALL) -Dm2755 $(PROG) $(DESTDIR)/usr/games/$(PROG) + $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN) + $(GINSTALL) -d $(DESTDIR)/usr/share/games/larn + $(GINSTALL) -Dm644 $(FILES) $(DESTDIR)/usr/share/games/larn/ -COPTS.display.c += -Wno-format-nonliteral -COPTS.monster.c += -Wno-format-nonliteral +clean: + rm -f $(CLEANFILES) $(PROG) -.include +.PHONY: all clean install diff --git a/larn/diag.c b/larn/diag.c index a3482c1d..0f00a6f1 100644 --- a/larn/diag.c +++ b/larn/diag.c @@ -20,6 +20,7 @@ static void fsorry(void); static void fcheat(void); static struct tms cputime; +time_t time(time_t *t); /* *************************** diff --git a/larn/main.c b/larn/main.c index 7b619f87..977c17d9 100644 --- a/larn/main.c +++ b/larn/main.c @@ -37,6 +37,8 @@ static void eatcookie(void); static void quaff(void); static int whatitem(const char *); +#define __unreachable() __builtin_unreachable() + static char copyright[] = "\nLarn is copyrighted 1986 by Noah Morgan.\n"; int srcount = 0; /* line counter for showstr() */ int dropflag = 0; /* if 1 then don't lookforobject() next round */ diff --git a/larn/scores.c b/larn/scores.c index 49a6f873..26ee7c42 100644 --- a/larn/scores.c +++ b/larn/scores.c @@ -38,6 +38,8 @@ __RCSID("$NetBSD: scores.c,v 1.21 2012/06/19 05:30:44 dholland Exp $"); #include "header.h" #include "extern.h" +#include + struct scofmt { /* This is the structure for the scoreboard */ long score; /* the score of the player */ long suid; /* the user id number of the player */ -- cgit v1.2.3-56-ge451