]> git.cameronkatri.com Git - bsdgames-darwin.git/blobdiff - factor/Makefile
cgram: provide usage on incorrect invocation
[bsdgames-darwin.git] / factor / Makefile
index f5224add254e5e5dde50b6e444d167db2fb3e763..1fea0f689675e54c9d8d3d5c80374338f2e4e047 100644 (file)
@@ -1,13 +1,21 @@
-#      $NetBSD: Makefile,v 1.8 2002/06/15 02:12:23 simonb Exp $
+#      $NetBSD: Makefile,v 1.13 2017/05/21 15:28:41 riastradh Exp $
 #      @(#)Makefile    8.1 (Berkeley) 5/31/93
 
 PROG=  factor
-SRCS=  factor.c pr_tbl.c
-CPPFLAGS+=-I${.CURDIR}/../primes
-LDADD+=        -lcrypto
-DPADD+=        ${LIBCRYPTO}
+SRCS=  factor.c ../primes/pr_tbl.c
 MAN=   factor.6
-MLINKS+=factor.6 primes.6
-.PATH: ${.CURDIR}/../primes
 
-.include <bsd.prog.mk>
+all: $(PROG)
+
+$(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)
+
+.PHONY: all clean install