From 420160f83da30cf97f4ea80a2486d4c69cedc893 Mon Sep 17 00:00:00 2001 From: peter Date: Sat, 25 Nov 1995 00:14:03 +0000 Subject: Part two of a repository operation to sort out the libmp/libgmp builds. After this commit, you should be able to build libmp and libgmp independently and without being forced to do a make depend first.. --- gnu/lib/libgmp/Makefile | 21 +++++++++------- gnu/lib/libmp/Makefile | 66 ++++++++++++------------------------------------- 2 files changed, 28 insertions(+), 59 deletions(-) diff --git a/gnu/lib/libgmp/Makefile b/gnu/lib/libgmp/Makefile index 7df8258..3c74b9b 100644 --- a/gnu/lib/libgmp/Makefile +++ b/gnu/lib/libgmp/Makefile @@ -1,14 +1,13 @@ # Makefile for libgmp -# $Id$ +# $Id: Makefile,v 1.1 1995/11/13 19:13:19 markm Exp $ LIB= gmp SRCS= $(GMP_SRCS) -.PATH: ${.CURDIR}/../libmp CLEANFILES+= cre-mparam cre-conv-tab gmp-mparam.h mp_bases.c -GMP_SRCS= $(MPZ_SRCS) $(MPQ_SRCS) $(MPN_SRCS) $(IMPL_SRCS) mp_bases.c +GMP_SRCS= mp_bases.c $(MPZ_SRCS) $(MPQ_SRCS) $(MPN_SRCS) $(IMPL_SRCS) -CFLAGS+= -I${.CURDIR}/../libmp -I${.OBJDIR} -Wall -Wstrict-prototypes -DLOCALE +CFLAGS+= -I${.CURDIR} -I${.OBJDIR} -Wall -Wstrict-prototypes -DLOCALE MPN_SRCS= mpn_add.c mpn_sub.c mpn_cmp.c mpn_mul.c mpn_div.c mpn_dm_1.c \ mpn_mod_1.c mpn_lshift.c mpn_rshift.c mpn_rshiftci.c mpn_sqrt.c @@ -36,18 +35,22 @@ MPQ_SRCS= mpq_init.c mpq_set.c mpq_set_ui.c mpq_set_si.c \ mpq_add.c mpq_sub.c mpq_mul.c mpq_div.c mpq_clear.c \ mpq_cmp.c mpq_inv.c mpq_neg.c +SUBDIR+= doc + beforedepend: gmp-mparam.h mp_bases.c beforeinstall: - cmp -s ${.CURDIR}/../libmp/gmp.h ${DESTDIR}/usr/include/gmp.h || \ + cmp -s ${.SRCDIR}/gmp.h ${DESTDIR}/usr/include/gmp.h || \ ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \ - ${.CURDIR}/../libmp/gmp.h ${DESTDIR}/usr/include/gmp.h + ${.SRCDIR}/gmp.h ${DESTDIR}/usr/include/gmp.h cre-mparam: cre-mparam.c - $(CC) $(CFLAGS) ${.OODATE} -o ${.TARGET} + $(CC) $(CFLAGS) ${.CURDIR}/cre-mparam.c -o ${.TARGET} + +cre-conv-tab: cre-conv-tab.c gmp-mparam.h + $(CC) $(CFLAGS) -lm ${.CURDIR}/cre-conv-tab.c -o ${.TARGET} -cre-conv-tab: cre-conv-tab.c - $(CC) $(CFLAGS) -lm ${.OODATE} -o ${.TARGET} +cre-conv-tab: gmp-mparam.h gmp-mparam.h: cre-mparam ./cre-mparam > tmp-${.TARGET} diff --git a/gnu/lib/libmp/Makefile b/gnu/lib/libmp/Makefile index a1e3007..4f7a474 100644 --- a/gnu/lib/libmp/Makefile +++ b/gnu/lib/libmp/Makefile @@ -1,17 +1,19 @@ # Makefile for libmp -# $Id: Makefile,v 1.2 1995/11/12 14:55:44 markm Exp $ +# $Id: Makefile,v 1.3 1995/11/13 18:39:23 markm Exp $ LIB= mp SRCS= $(MP_SRCS) -CLEANFILES+= cre-mparam cre-conv-tab gcd.c gmp-mparam.h mp_bases.c \ - madd.c mcmp.c msqrt.c msub.c mult.c pow.c rpow.c +.PATH: ${.CURDIR}/../libgmp +CLEANFILES+= cre-mparam cre-conv-tab gmp-mparam.h mp_bases.c -MP_SRCS= $(BSDMP_SRCS) $(MPN_SRCS) $(IMPL_SRCS) mp_bases.c mpz_sizeinb.c +MP_SRCS= mp_bases.c $(BSDMP_SRCS) $(MPN_SRCS) $(IMPL_SRCS) -CFLAGS+= -I${.CURDIR} -I${.OBJDIR} -Wall -Wstrict-prototypes -DLOCALE +CFLAGS+= -I${.CURDIR}/../libgmp -I${.OBJDIR} -Wall -Wstrict-prototypes \ + -DLOCALE -DBERKELEY_MP -BSDMP_SRCS= gcd.c itom.c madd.c mcmp.c mdiv.c move.c msub.c mtox.c mult.c \ - pow.c rpow.c xtom.c msqrt.c sdiv.c mout.c min.c mfree.c +BSDMP_SRCS= mpz_gcd.c mpz_add.c mpz_cmp.c mpz_sub.c mpz_mul.c \ + mpz_powm.c mpz_pow_ui.c mpz_sqrtrem.c mpz_sizeinb.c \ + itom.c mdiv.c move.c mtox.c xtom.c sdiv.c mout.c min.c mfree.c MPN_SRCS= mpn_add.c mpn_sub.c mpn_cmp.c mpn_mul.c mpn_div.c mpn_dm_1.c \ mpn_mod_1.c mpn_lshift.c mpn_rshift.c mpn_rshiftci.c mpn_sqrt.c @@ -19,59 +21,23 @@ MPN_SRCS= mpn_add.c mpn_sub.c mpn_cmp.c mpn_mul.c mpn_div.c mpn_dm_1.c \ IMPL_SRCS= memory.c mp_set_fns.c _mpz_set_str.c _mpz_get_str.c \ mpz_realloc.c mp_clz_tab.c -SUBDIR+= doc - beforedepend: gmp-mparam.h mp_bases.c beforeinstall: - cmp -s ${.CURDIR}/mp.h ${DESTDIR}/usr/include/mp.h || \ + cmp -s ${.CURDIR}/../libgmp/mp.h ${DESTDIR}/usr/include/mp.h || \ ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \ - ${.CURDIR}/mp.h ${DESTDIR}/usr/include/mp.h + ${.CURDIR}/../libgmp/mp.h ${DESTDIR}/usr/include/mp.h cre-mparam: cre-mparam.c - $(CC) $(CFLAGS) ${.OODATE} -o ${.TARGET} + $(CC) $(CFLAGS) ${.CURDIR}/../libgmp/cre-mparam.c -o ${.TARGET} -cre-conv-tab: cre-conv-tab.c - $(CC) $(CFLAGS) -lm ${.OODATE} -o ${.TARGET} +cre-conv-tab: cre-conv-tab.c gmp-mparam.h + $(CC) $(CFLAGS) -lm ${.CURDIR}/../libgmp/cre-conv-tab.c -o ${.TARGET} gmp-mparam.h: cre-mparam - ./cre-mparam > tmp-${.TARGET} - mv tmp-${.TARGET} ${.TARGET} + ./cre-mparam > ${.TARGET} mp_bases.c: cre-conv-tab - ./cre-conv-tab > tmp-${.TARGET} - mv tmp-${.TARGET} ${.TARGET} - -gcd.c: mpz_gcd.c mp.h gmp.h gmp-impl.h gmp-mparam.h longlong.h - $(CC) $(CFLAGS) -E -DBERKELEY_MP ${.CURDIR}/mpz_gcd.c\ - | grep -v '^#' > ${.TARGET} - -pow.c: mpz_powm.c mp.h gmp.h gmp-impl.h gmp-mparam.h longlong.h - $(CC) $(CFLAGS) -E -DBERKELEY_MP ${.CURDIR}/mpz_powm.c\ - | grep -v '^#' > ${.TARGET} - -rpow.c: mpz_pow_ui.c mp.h gmp.h gmp-impl.h gmp-mparam.h longlong.h - $(CC) $(CFLAGS) -E -DBERKELEY_MP ${.CURDIR}/mpz_pow_ui.c\ - | grep -v '^#' > ${.TARGET} - -madd.c: mpz_add.c mp.h gmp.h gmp-impl.h gmp-mparam.h - $(CC) $(CFLAGS) -E -DBERKELEY_MP ${.CURDIR}/mpz_add.c\ - | grep -v '^#' > ${.TARGET} - -msub.c: mpz_sub.c mp.h gmp.h gmp-impl.h gmp-mparam.h - $(CC) $(CFLAGS) -E -DBERKELEY_MP ${.CURDIR}/mpz_sub.c\ - | grep -v '^#' > ${.TARGET} - -mult.c: mpz_mul.c mp.h gmp.h gmp-impl.h gmp-mparam.h - $(CC) $(CFLAGS) -E -DBERKELEY_MP ${.CURDIR}/mpz_mul.c\ - | grep -v '^#' > ${.TARGET} - -mcmp.c: mpz_cmp.c mp.h gmp.h gmp-impl.h gmp-mparam.h - $(CC) $(CFLAGS) -E -DBERKELEY_MP ${.CURDIR}/mpz_cmp.c\ - | grep -v '^#' > ${.TARGET} - -msqrt.c: mpz_sqrtrem.c mp.h gmp.h gmp-impl.h gmp-mparam.h - $(CC) $(CFLAGS) -E -DBERKELEY_MP ${.CURDIR}/mpz_sqrtrem.c\ - | grep -v '^#' > ${.TARGET} + ./cre-conv-tab > ${.TARGET} .include -- cgit v1.1