]> git.cameronkatri.com Git - bsdgames-darwin.git/blobdiff - factor/Makefile
cgram: provide usage on incorrect invocation
[bsdgames-darwin.git] / factor / Makefile
index 8f69170e188016e2b76bc395c239ff6961b35a60..1fea0f689675e54c9d8d3d5c80374338f2e4e047 100644 (file)
@@ -1,17 +1,21 @@
 #      $NetBSD: Makefile,v 1.13 2017/05/21 15:28:41 riastradh Exp $
 #      @(#)Makefile    8.1 (Berkeley) 5/31/93
 
-PRIMES=        ${NETBSDSRCDIR}/games/primes
-
 PROG=  factor
-SRCS=  factor.c pr_tbl.c
-CPPFLAGS+=-I${PRIMES}
+SRCS=  factor.c ../primes/pr_tbl.c
+MAN=   factor.6
 
-CPPFLAGS+=-DHAVE_OPENSSL
-LDADD+=        -lcrypto -lcrypt
-DPADD+=        ${LIBCRYPTO} ${LIBCRYPT}
+all: $(PROG)
 
-MAN=   factor.6
-.PATH: ${PRIMES}
+$(PROG): $(SRCS)
+       $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROG) $(SRCS) -I../primes -DHAVE_OPENSSL -lcrypto
+       $(STRIP) $(PROG)
+
+install: $(PROG) $(MAN)
+       $(GINSTALL) -Dm755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
+       $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
+
+clean:
+       rm -f $(CLEANFILES) $(PROG)
 
-.include <bsd.prog.mk>
+.PHONY: all clean install