]> git.cameronkatri.com Git - bsdgames-darwin.git/blobdiff - adventure/Makefile
cgram: sort includes
[bsdgames-darwin.git] / adventure / Makefile
index b4b0b3524ec00a9e7d07a884464083b1fdaf2364..b656970b25cfc255c733196639e891ae7e52b9f8 100644 (file)
@@ -1,17 +1,28 @@
-#      $NetBSD: Makefile,v 1.5 1997/08/11 14:06:10 christos Exp $
+#      $NetBSD: Makefile,v 1.14 2013/02/16 16:30:28 jmcneill Exp $
 #      @(#)Makefile    8.1 (Berkeley) 6/12/93
 
-WARNS?=        1
 PROG=  adventure
 SRCS=  main.c init.c done.c save.c subr.c vocab.c wizard.c io.c data.c crc.c
 MAN=   adventure.6
-HIDEGAME=hidegame
-CLEANFILES+=setup data.c
+CLEANFILES+=mkdata data.c
 
-data.c: glorkz setup
-       ./setup ${.CURDIR}/glorkz > data.c
+all: $(PROG)
 
-setup: setup.c hdr.h
-       ${HOST_CC} -o setup ${.CURDIR}/setup.c
+$(PROG): $(SRCS)
+       $(CC) $(CFLAGS) -o $(PROG) $(SRCS)
+       $(STRIP) $(PROG)
 
-.include <bsd.prog.mk>
+data.c: glorkz mkdata
+       ./mkdata glorkz > data.c
+
+mkdata: setup.c
+       clang -o mkdata setup.c
+
+install: $(PROG) $(MAN)
+       $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+       $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
+
+clean:
+       rm -f $(CLEANFILES) $(PROG)
+
+.PHONY: all clean install