summaryrefslogtreecommitdiffstats
path: root/factor/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'factor/Makefile')
-rw-r--r--factor/Makefile24
1 files changed, 14 insertions, 10 deletions
diff --git a/factor/Makefile b/factor/Makefile
index 8f69170e..b84802d3 100644
--- a/factor/Makefile
+++ b/factor/Makefile
@@ -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)/usr/games/$(PROG)
+ $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
+
+clean:
+ rm -f $(CLEANFILES) $(PROG)
-.include <bsd.prog.mk>
+.PHONY: all clean install