Commit Diff


commit - 60af955760fad578fa6ffb0444dc813c1dcceada
commit + 051431c4e9b8488f906aa8b8cb3678e2b77b5816
blob - 8445f36026cb2591b73ace86b6bda1f132a72eb4
blob + c333fec445c19b959bfa940280043baaa5a6957c
--- Makefile
+++ Makefile
@@ -1,15 +1,20 @@
-#	$NetBSD: Makefile,v 1.10 2023/06/03 09:09:09 lukem Exp $
-#	@(#)Makefile	8.1 (Berkeley) 5/31/93
+.POSIX:
 
-PROG=	tetris
-SRCS=	input.c screen.c shapes.c scores.c tetris.c
-MAN=	tetris.6
-DPADD=	${LIBTERMINFO}
-LDADD=	-lncurses
-HIDEGAME=hidegame
-SETGIDGAME=yes
+PREFIX = /usr/local
+MANPREFIX = ${PREFIX}/man
+LIBS = -lncurses
+OBJ = input.o screen.o shapes.o scores.o tetris.o
 
-COPTS.tetris.c+=	${CC_WNO_FORMAT_TRUNCATION}
-COPTS.scores.c+=	${CC_WNO_FORMAT_TRUNCATION}
+all: tetris
 
-.include <bsd.prog.mk>
+clean:
+	rm -f *.o tetris
+
+tetris: ${OBJ}
+	${CC} -o $@ ${OBJ} ${CFLAGS} ${LIBS}
+
+install: tetris
+	mkdir -p ${DESTDIR}${PREFIX}/bin ${DESTDIR}${MANPREFIX}/man6
+	cp -f tetris ${DESTDIR}${PREFIX}/bin/
+	cp -f tetris.6 ${DESTDIR}${MANPREFIX}/man6/
+
blob - /dev/null
blob + 213c0754c6129032aa06721b820e69d8b14726ad (mode 644)
--- /dev/null
+++ .gitignore
@@ -0,0 +1,2 @@
+tetris
+*.o