summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2021-10-23 08:06:39 -0400
committerMichael Orlitzky <mjo@gentoo.org>2021-10-23 08:07:10 -0400
commit4bede998cb6d8b4654b50a706816796f08ee87e3 (patch)
treeade0cd0bc3788cb2994d42aa85f92c7c0c522425 /sci-libs/lrslib/files
parentdev-python/virtualenv: Backport pypy3.8 fixes (diff)
downloadgentoo-4bede998cb6d8b4654b50a706816796f08ee87e3.tar.gz
gentoo-4bede998cb6d8b4654b50a706816796f08ee87e3.tar.bz2
gentoo-4bede998cb6d8b4654b50a706816796f08ee87e3.zip
sci-libs/lrslib: new revision with CFLAGS/LDFLAGS patches.
The LDFLAGS patch here is new, and fixes bug 728044. The CFLAGS patch merely replaces an inline "sed", but will allow me to send this change upstream (where they've made an effort to use CFLAGS before). Closes: https://bugs.gentoo.org/728044 Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
Diffstat (limited to 'sci-libs/lrslib/files')
-rw-r--r--sci-libs/lrslib/files/lrslib-071b-makefile-cflags.patch100
-rw-r--r--sci-libs/lrslib/files/lrslib-071b-makefile-ldflags.patch184
2 files changed, 284 insertions, 0 deletions
diff --git a/sci-libs/lrslib/files/lrslib-071b-makefile-cflags.patch b/sci-libs/lrslib/files/lrslib-071b-makefile-cflags.patch
new file mode 100644
index 000000000000..1cc8303f616a
--- /dev/null
+++ b/sci-libs/lrslib/files/lrslib-071b-makefile-cflags.patch
@@ -0,0 +1,100 @@
+From 8a99af08a479c413d54c1a8def7479c778e55703 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 23 Oct 2021 07:53:22 -0400
+Subject: [PATCH 2/2] makefile: replace remaining "-O3" with $(CFLAGS).
+
+Some time in the past, $CFLAGS was inserted into most of the build
+rules, and defaulted to "-O3 -Wall" if the user does not override
+that. However a few lingering "-O3" and "-O3 -Wall" remain hard-
+coded in the makefile. Here we fix that.
+---
+ makefile | 48 ++++++++++++++++++++++++------------------------
+ 1 file changed, 24 insertions(+), 24 deletions(-)
+
+diff --git a/makefile b/makefile
+index fd8a613..c14b93e 100644
+--- a/makefile
++++ b/makefile
+@@ -64,12 +64,12 @@ MPLRSOBJ64=lrslong1-mplrs.o lrslib1-mplrs.o lrslibgmp-mplrs.o lrsgmp-mplrs.o lrs
+
+ lrs: ${LRSOBJ}
+ $(CC) ${CFLAGS} -DMA ${BITS} -L${LIBDIR} $(LDFLAGS) -o lrs ${LRSOBJ} -lgmp
+- $(CC) -O3 hvref.c $(LDFLAGS) -o hvref
++ $(CC) $(CFLAGS) hvref.c $(LDFLAGS) -o hvref
+ ln -s -f lrs redund
+
+ lrsmp: ${LRSOBJMP}
+ $(CC) ${CFLAGS} -DMA ${BITS} $(LDFLAGS) -o lrsmp ${LRSOBJMP}
+- $(CC) -O3 hvref.c $(LDFLAGS) -o hvref
++ $(CC) $(CFLAGS) hvref.c $(LDFLAGS) -o hvref
+ ln -s -f lrs redund
+
+ lrs64: ${LRSOBJ64}
+@@ -157,8 +157,8 @@ singlemplrs: mplrsgmp mplrs1 mplrs2
+
+ flint: lrs.c lrslib.c lrslib.h lrsgmp.c lrsgmp.h
+ @test -d ${INCLUDEDIR}/flint || { echo ${INCLUDEDIR}/flint not found; exit 1; }
+- $(CC) -O3 -DFLINT -I/usr/local/include/flint lrs.c lrslib.c lrsgmp.c lrsdriver.c -L/usr/local/lib -Wl,-rpath=/usr/local/lib -lflint $(LDFLAGS) -o lrsflint -lgmp
+-# $(CC) -O3 -DFLINT -I${INCLUDEDIR} -I${INCLUDEDIR}/flint lrs.c lrsdriver.c lrslib.c lrsgmp.c -L${LIBDIR} -lflint -o lrsflint -lgmp
++ $(CC) $(CFLAGS) -DFLINT -I/usr/local/include/flint lrs.c lrslib.c lrsgmp.c lrsdriver.c -L/usr/local/lib -Wl,-rpath=/usr/local/lib -lflint $(LDFLAGS) -o lrsflint -lgmp
++# $(CC) $(CFLAGS) -DFLINT -I${INCLUDEDIR} -I${INCLUDEDIR}/flint lrs.c lrsdriver.c lrslib.c lrsgmp.c -L${LIBDIR} -lflint -o lrsflint -lgmp
+
+ mplrsflint: mplrs.c mplrs.h lrslib.c lrslib.h lrsgmp.c lrsgmp.h lrsdriver.c lrsdriver.h
+ ${mpicxx} ${CFLAGS} -DTIMES -DSIGNALS -D_WITH_GETLINE -DFLINT -I${INCLUDEDIR}/flint -DPLRS $(LDFLAGS) -o mplrsflint mplrs.c lrsdriver.c lrslib.c lrsgmp.c -L${LIBDIR} -lflint -lgmp
+@@ -176,33 +176,33 @@ single: lrs.c lrslong.c lrslong.h lrslib.c lrslib.h lrsgmp.c lrsgmp.h lrsdriver
+ ln -s -f lrs2 redund2
+
+ allmp: lrs.c lrslib.c lrslib.h lrsmp.c lrsmp.h lrsdriver.h lrsdriver.c
+- $(CC) -Wall -O3 $(LDFLAGS) -o lrs lrs.c lrslib.c lrsdriver.c lrsmp.c
+- $(CC) -Wall -O3 -DSAFE -DLRSLONG $(LDFLAGS) -o lrs1 lrs.c lrslib.c lrsdriver.c lrslong.c
+- $(CC) -Wall -O3 -DSAFE -DLRSLONG ${BITS} $(LDFLAGS) -o lrs2 lrs.c lrslib.c lrsdriver.c lrslong.c
+- $(CC) -O3 -DLRS_QUIET $(LDFLAGS) -o lrsnash lrsnash.c lrsnashlib.c lrslib.c lrsdriver.c lrsmp.c -static
+- $(CC) -O3 $(LDFLAGS) -o setnash setupnash.c lrslib.c lrsdriver.c lrsmp.c
+- $(CC) -O3 $(LDFLAGS) -o setnash2 setupnash2.c lrslib.c lrsdriver.c lrsmp.c
+- $(CC) -O3 $(LDFLAGS) -o 2nash 2nash.c
++ $(CC) -Wall $(CFLAGS) $(LDFLAGS) -o lrs lrs.c lrslib.c lrsdriver.c lrsmp.c
++ $(CC) -Wall $(CFLAGS) -DSAFE -DLRSLONG $(LDFLAGS) -o lrs1 lrs.c lrslib.c lrsdriver.c lrslong.c
++ $(CC) -Wall $(CFLAGS) -DSAFE -DLRSLONG ${BITS} $(LDFLAGS) -o lrs2 lrs.c lrslib.c lrsdriver.c lrslong.c
++ $(CC) $(CFLAGS) -DLRS_QUIET $(LDFLAGS) -o lrsnash lrsnash.c lrsnashlib.c lrslib.c lrsdriver.c lrsmp.c -static
++ $(CC) $(CFLAGS) $(LDFLAGS) -o setnash setupnash.c lrslib.c lrsdriver.c lrsmp.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -o setnash2 setupnash2.c lrslib.c lrsdriver.c lrsmp.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -o 2nash 2nash.c
+
+ demo: lpdemo1.c lrslib.c lrsdriver.c lrslib.h lrsgmp.c lrsgmp.h
+- $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o lpdemo1 lpdemo1.c lrslib.c lrsdriver.c lrsgmp.c -lgmp -DGMP
+- $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o lpdemo lpdemo.c lrslib.c lrsdriver.c lrsgmp.c -lgmp -DGMP
+- $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o lpdemo2 lpdemo2.c lrslib.c lrsdriver.c lrsgmp.c -lgmp -DGMP
+- $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o vedemo vedemo.c lrslib.c lrsdriver.c lrsgmp.c -lgmp -DGMP
+- $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o chdemo chdemo.c lrslib.c lrsdriver.c lrsgmp.c -lgmp -DGMP
++ $(CC) $(CFLAGS) -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o lpdemo1 lpdemo1.c lrslib.c lrsdriver.c lrsgmp.c -lgmp -DGMP
++ $(CC) $(CFLAGS) -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o lpdemo lpdemo.c lrslib.c lrsdriver.c lrsgmp.c -lgmp -DGMP
++ $(CC) $(CFLAGS) -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o lpdemo2 lpdemo2.c lrslib.c lrsdriver.c lrsgmp.c -lgmp -DGMP
++ $(CC) $(CFLAGS) -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o vedemo vedemo.c lrslib.c lrsdriver.c lrsgmp.c -lgmp -DGMP
++ $(CC) $(CFLAGS) -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o chdemo chdemo.c lrslib.c lrsdriver.c lrsgmp.c -lgmp -DGMP
+
+ lrsnash: lrsnash.c nashdemo.c lrsnashlib.c lrslib.c lrsnashlib.h lrslib.h lrsgmp.c lrsgmp.h lrslong.h lrsdriver.h lrsdriver.c
+- $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o lrsnashgmp lrsnash.c lrsnashlib.c lrslib.c lrsgmp.c lrsdriver.c -lgmp -DGMP
+- $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o lrsnash1 lrsnash.c lrsnashlib.c lrslib.c lrslong.c lrsdriver.c -DLRSLONG -DSAFE
+- $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o lrsnash2 lrsnash.c lrsnashlib.c lrslib.c lrslong.c lrsdriver.c -DLRSLONG -DSAFE ${BITS}
+- $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o nashdemo nashdemo.c lrsnashlib.c lrslib.c lrsgmp.c lrsdriver.c -lgmp -DGMP
+- $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o 2nash 2nash.c
++ $(CC) $(CFLAGS) -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o lrsnashgmp lrsnash.c lrsnashlib.c lrslib.c lrsgmp.c lrsdriver.c -lgmp -DGMP
++ $(CC) $(CFLAGS) -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o lrsnash1 lrsnash.c lrsnashlib.c lrslib.c lrslong.c lrsdriver.c -DLRSLONG -DSAFE
++ $(CC) $(CFLAGS) -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o lrsnash2 lrsnash.c lrsnashlib.c lrslib.c lrslong.c lrsdriver.c -DLRSLONG -DSAFE ${BITS}
++ $(CC) $(CFLAGS) -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o nashdemo nashdemo.c lrsnashlib.c lrslib.c lrsgmp.c lrsdriver.c -lgmp -DGMP
++ $(CC) $(CFLAGS) -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o 2nash 2nash.c
+ cp lrsnashgmp lrsnash
+
+ fel: fel.c lrslib.h lrslib.c lrsgmp.h lrsgmp.c lrslong.c
+- $(CC) -O3 -Wall -DGMP -I${INCLUDEDIR} fel.c lrslib.c lrsdriver.c lrsgmp.c -L${LIBDIR} -lgmp $(LDFLAGS) -o felgmp
+- $(CC) -O3 -Wall -I${INCLUDEDIR} fel.c lrslib.c lrsdriver.c lrslong.c -L${LIBDIR} -DLRSLONG -DSAFE $(LDFLAGS) -o fel1
+- $(CC) -O3 -Wall -I${INCLUDEDIR} fel.c lrslib.c lrsdriver.c lrslong.c -L${LIBDIR} -DLRSLONG -DSAFE ${BITS} $(LDFLAGS) -o fel2
++ $(CC) $(CFLAGS) -DGMP -I${INCLUDEDIR} fel.c lrslib.c lrsdriver.c lrsgmp.c -L${LIBDIR} -lgmp $(LDFLAGS) -o felgmp
++ $(CC) $(CFLAGS) -I${INCLUDEDIR} fel.c lrslib.c lrsdriver.c lrslong.c -L${LIBDIR} -DLRSLONG -DSAFE $(LDFLAGS) -o fel1
++ $(CC) $(CFLAGS) -I${INCLUDEDIR} fel.c lrslib.c lrsdriver.c lrslong.c -L${LIBDIR} -DLRSLONG -DSAFE ${BITS} $(LDFLAGS) -o fel2
+
+ ######################################################################
+ # From here on the author is David Bremner <bremner@unb.ca> to whom you should turn for help
+--
+2.32.0
+
diff --git a/sci-libs/lrslib/files/lrslib-071b-makefile-ldflags.patch b/sci-libs/lrslib/files/lrslib-071b-makefile-ldflags.patch
new file mode 100644
index 000000000000..c8c9bc1e8206
--- /dev/null
+++ b/sci-libs/lrslib/files/lrslib-071b-makefile-ldflags.patch
@@ -0,0 +1,184 @@
+From f9a97514196eb35de1cdae1c1fc622c8aff5fb04 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 23 Oct 2021 07:37:57 -0400
+Subject: [PATCH 1/2] makefile: add $(LDFLAGS) to commands that induce linkage.
+
+Like the more-familiar CFLAGS, there is a standard variable called
+LDFLAGS that should be used while linking libraries and executables.
+The default compilation rules for POSIX make include it,
+
+ https://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html
+
+This commit adds LDFLAGS to the custom makefile commands that link
+either an executable or a shared library.
+---
+ makefile | 80 ++++++++++++++++++++++++++++----------------------------
+ 1 file changed, 40 insertions(+), 40 deletions(-)
+
+diff --git a/makefile b/makefile
+index 32e6b52..fd8a613 100644
+--- a/makefile
++++ b/makefile
+@@ -63,17 +63,17 @@ LRSOBJ64=lrs64.o lrslong1.o lrslib1.o lrslibgmp.o lrsgmp.o lrsdriver.o
+ MPLRSOBJ64=lrslong1-mplrs.o lrslib1-mplrs.o lrslibgmp-mplrs.o lrsgmp-mplrs.o lrsdriver-mplrs.o mplrs64.o
+
+ lrs: ${LRSOBJ}
+- $(CC) ${CFLAGS} -DMA ${BITS} -L${LIBDIR} -o lrs ${LRSOBJ} -lgmp
+- $(CC) -O3 hvref.c -o hvref
++ $(CC) ${CFLAGS} -DMA ${BITS} -L${LIBDIR} $(LDFLAGS) -o lrs ${LRSOBJ} -lgmp
++ $(CC) -O3 hvref.c $(LDFLAGS) -o hvref
+ ln -s -f lrs redund
+
+ lrsmp: ${LRSOBJMP}
+- $(CC) ${CFLAGS} -DMA ${BITS} -o lrsmp ${LRSOBJMP}
+- $(CC) -O3 hvref.c -o hvref
++ $(CC) ${CFLAGS} -DMA ${BITS} $(LDFLAGS) -o lrsmp ${LRSOBJMP}
++ $(CC) -O3 hvref.c $(LDFLAGS) -o hvref
+ ln -s -f lrs redund
+
+ lrs64: ${LRSOBJ64}
+- $(CC) ${CFLAGS} -DMA -L${LIBDIR} -o lrs ${LRSOBJ64} -lgmp
++ $(CC) ${CFLAGS} -DMA -L${LIBDIR} $(LDFLAGS) -o lrs ${LRSOBJ64} -lgmp
+
+ lrs.o: lrs.c
+ $(CC) ${CFLAGS} -DMA ${BITS} -c -o lrs.o lrs.c
+@@ -106,7 +106,7 @@ lrsmp.o: lrsmp.c lrsmp.h
+ $(CC) ${CFLAGS} -DMA -DMP -c -o lrsmp.o lrsmp.c
+
+ checkpred: checkpred.c lrsgmp.h lrsgmp.c
+- $(CC) $(CFLAGS) -DGMP -lgmp -o checkpred checkpred.c lrsgmp.c
++ $(CC) $(CFLAGS) -DGMP -lgmp $(LDFLAGS) -o checkpred checkpred.c lrsgmp.c
+
+ lrslong1-mplrs.o: lrslong.c lrslong.h
+ $(mpicxx) ${CFLAGS} -DTIMES -DSIGNALS -DMA -DSAFE -DLRSLONG -DPLRS -c -o lrslong1-mplrs.o lrslong.c
+@@ -136,73 +136,73 @@ mplrs64.o: mplrs.c mplrs.h lrslib.h lrsgmp.h
+ $(mpicxx) ${CFLAGS} -I${INCLUDEDIR} -DMA -DPLRS -DTIMES -DSIGNALS -D_WITH_GETLINE -c -o mplrs64.o mplrs.c
+
+ mplrs: ${MPLRSOBJ} mplrsgmp
+- $(mpicxx) ${CFLAGS} -DTIMES -DSIGNALS -D_WITH_GETLINE -DPLRS -DMA ${BITS} -L${LIBDIR} -o mplrs ${MPLRSOBJ} -lgmp
++ $(mpicxx) ${CFLAGS} -DTIMES -DSIGNALS -D_WITH_GETLINE -DPLRS -DMA ${BITS} -L${LIBDIR} $(LDFLAGS) -o mplrs ${MPLRSOBJ} -lgmp
+
+ mplrs64: ${MPLRSOBJ64} mplrsgmp
+- $(mpicxx) ${CFLAGS} -DTIMES -DSIGNALS -D_WITH_GETLINE -DPLRS -DMA -L${LIBDIR} -o mplrs ${MPLRSOBJ64} -lgmp
++ $(mpicxx) ${CFLAGS} -DTIMES -DSIGNALS -D_WITH_GETLINE -DPLRS -DMA -L${LIBDIR} $(LDFLAGS) -o mplrs ${MPLRSOBJ64} -lgmp
+
+ mplrsgmp: mplrs.c mplrs.h lrslib.c lrslib.h lrsgmp.c lrsgmp.h lrsdriver.h lrsdriver.c
+- $(mpicxx) ${CFLAGS} -DTIMES -DSIGNALS -D_WITH_GETLINE -DPLRS -DGMP -I${INCLUDEDIR} mplrs.c lrslib.c lrsgmp.c lrsdriver.c -L${LIBDIR} -o mplrsgmp -lgmp
++ $(mpicxx) ${CFLAGS} -DTIMES -DSIGNALS -D_WITH_GETLINE -DPLRS -DGMP -I${INCLUDEDIR} mplrs.c lrslib.c lrsgmp.c lrsdriver.c -L${LIBDIR} $(LDFLAGS) -o mplrsgmp -lgmp
+
+ mplrs1: mplrs.c mplrs.h lrslib.c lrslib.h lrslong.c lrslong.h lrsdriver.h lrsdriver.c
+- $(mpicxx) ${CFLAGS} -DTIMES -DSIGNALS -D_WITH_GETLINE -DPLRS -DLRSLONG mplrs.c lrslib.c lrslong.c lrsdriver.c -o mplrs1
++ $(mpicxx) ${CFLAGS} -DTIMES -DSIGNALS -D_WITH_GETLINE -DPLRS -DLRSLONG mplrs.c lrslib.c lrslong.c lrsdriver.c $(LDFLAGS) -o mplrs1
+
+ mplrs2: mplrs.c mplrs.h lrslib.c lrslib.h lrslong.c lrslong.h lrsdriver.h lrsdriver.c
+- $(mpicxx) ${CFLAGS} -DTIMES -DSIGNALS -D_WITH_GETLINE -DPLRS -DSAFE -DLRSLONG ${BITS} mplrs.c lrslib.c lrslong.c lrsdriver.c -o mplrs2
++ $(mpicxx) ${CFLAGS} -DTIMES -DSIGNALS -D_WITH_GETLINE -DPLRS -DSAFE -DLRSLONG ${BITS} mplrs.c lrslib.c lrslong.c lrsdriver.c $(LDFLAGS) -o mplrs2
+
+ mplrsmp: mplrs.c mplrs.h lrslib.c lrslib.h lrsmp.c lrsmp.h lrsdriver.h lrsdriver.c
+- $(mpicxx) ${CFLAGS} -DMP -DTIMES -DSIGNALS -D_WITH_GETLINE -DPLRS mplrs.c lrslib.c lrsmp.c lrsdriver.c -o mplrsmp
++ $(mpicxx) ${CFLAGS} -DMP -DTIMES -DSIGNALS -D_WITH_GETLINE -DPLRS mplrs.c lrslib.c lrsmp.c lrsdriver.c $(LDFLAGS) -o mplrsmp
+
+ singlemplrs: mplrsgmp mplrs1 mplrs2
+
+ flint: lrs.c lrslib.c lrslib.h lrsgmp.c lrsgmp.h
+ @test -d ${INCLUDEDIR}/flint || { echo ${INCLUDEDIR}/flint not found; exit 1; }
+- $(CC) -O3 -DFLINT -I/usr/local/include/flint lrs.c lrslib.c lrsgmp.c lrsdriver.c -L/usr/local/lib -Wl,-rpath=/usr/local/lib -lflint -o lrsflint -lgmp
++ $(CC) -O3 -DFLINT -I/usr/local/include/flint lrs.c lrslib.c lrsgmp.c lrsdriver.c -L/usr/local/lib -Wl,-rpath=/usr/local/lib -lflint $(LDFLAGS) -o lrsflint -lgmp
+ # $(CC) -O3 -DFLINT -I${INCLUDEDIR} -I${INCLUDEDIR}/flint lrs.c lrsdriver.c lrslib.c lrsgmp.c -L${LIBDIR} -lflint -o lrsflint -lgmp
+
+ mplrsflint: mplrs.c mplrs.h lrslib.c lrslib.h lrsgmp.c lrsgmp.h lrsdriver.c lrsdriver.h
+- ${mpicxx} ${CFLAGS} -DTIMES -DSIGNALS -D_WITH_GETLINE -DFLINT -I${INCLUDEDIR}/flint -DPLRS -o mplrsflint mplrs.c lrsdriver.c lrslib.c lrsgmp.c -L${LIBDIR} -lflint -lgmp
++ ${mpicxx} ${CFLAGS} -DTIMES -DSIGNALS -D_WITH_GETLINE -DFLINT -I${INCLUDEDIR}/flint -DPLRS $(LDFLAGS) -o mplrsflint mplrs.c lrsdriver.c lrslib.c lrsgmp.c -L${LIBDIR} -lflint -lgmp
+
+ #comment out lines with ${BITS} if __int128 not supported by your C compiler
+
+ lrsgmp: lrs.c lrslib.c lrslib.h lrsgmp.c lrsgmp.h lrsdriver.h lrsdriver.c
+- $(CC) ${CFLAGS} -DGMP -I${INCLUDEDIR} -o lrsgmp lrs.c lrslib.c lrsgmp.c lrsdriver.c -L${LIBDIR} -lgmp
++ $(CC) ${CFLAGS} -DGMP -I${INCLUDEDIR} $(LDFLAGS) -o lrsgmp lrs.c lrslib.c lrsgmp.c lrsdriver.c -L${LIBDIR} -lgmp
+ ln -s -f lrsgmp redundgmp
+
+ single: lrs.c lrslong.c lrslong.h lrslib.c lrslib.h lrsgmp.c lrsgmp.h lrsdriver.h lrsdriver.c
+- $(CC) ${CFLAGS} -DSAFE -DLRSLONG -o lrs1 lrs.c lrslib.c lrslong.c lrsdriver.c
+- $(CC) ${CFLAGS} ${BITS} -DSAFE -DLRSLONG -o lrs2 lrs.c lrslib.c lrslong.c lrsdriver.c
++ $(CC) ${CFLAGS} -DSAFE -DLRSLONG $(LDFLAGS) -o lrs1 lrs.c lrslib.c lrslong.c lrsdriver.c
++ $(CC) ${CFLAGS} ${BITS} -DSAFE -DLRSLONG $(LDFLAGS) -o lrs2 lrs.c lrslib.c lrslong.c lrsdriver.c
+ ln -s -f lrs1 redund1
+ ln -s -f lrs2 redund2
+
+ allmp: lrs.c lrslib.c lrslib.h lrsmp.c lrsmp.h lrsdriver.h lrsdriver.c
+- $(CC) -Wall -O3 -o lrs lrs.c lrslib.c lrsdriver.c lrsmp.c
+- $(CC) -Wall -O3 -DSAFE -DLRSLONG -o lrs1 lrs.c lrslib.c lrsdriver.c lrslong.c
+- $(CC) -Wall -O3 -DSAFE -DLRSLONG ${BITS} -o lrs2 lrs.c lrslib.c lrsdriver.c lrslong.c
+- $(CC) -O3 -DLRS_QUIET -o lrsnash lrsnash.c lrsnashlib.c lrslib.c lrsdriver.c lrsmp.c -static
+- $(CC) -O3 -o setnash setupnash.c lrslib.c lrsdriver.c lrsmp.c
+- $(CC) -O3 -o setnash2 setupnash2.c lrslib.c lrsdriver.c lrsmp.c
+- $(CC) -O3 -o 2nash 2nash.c
++ $(CC) -Wall -O3 $(LDFLAGS) -o lrs lrs.c lrslib.c lrsdriver.c lrsmp.c
++ $(CC) -Wall -O3 -DSAFE -DLRSLONG $(LDFLAGS) -o lrs1 lrs.c lrslib.c lrsdriver.c lrslong.c
++ $(CC) -Wall -O3 -DSAFE -DLRSLONG ${BITS} $(LDFLAGS) -o lrs2 lrs.c lrslib.c lrsdriver.c lrslong.c
++ $(CC) -O3 -DLRS_QUIET $(LDFLAGS) -o lrsnash lrsnash.c lrsnashlib.c lrslib.c lrsdriver.c lrsmp.c -static
++ $(CC) -O3 $(LDFLAGS) -o setnash setupnash.c lrslib.c lrsdriver.c lrsmp.c
++ $(CC) -O3 $(LDFLAGS) -o setnash2 setupnash2.c lrslib.c lrsdriver.c lrsmp.c
++ $(CC) -O3 $(LDFLAGS) -o 2nash 2nash.c
+
+ demo: lpdemo1.c lrslib.c lrsdriver.c lrslib.h lrsgmp.c lrsgmp.h
+- $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} -o lpdemo1 lpdemo1.c lrslib.c lrsdriver.c lrsgmp.c -lgmp -DGMP
+- $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} -o lpdemo lpdemo.c lrslib.c lrsdriver.c lrsgmp.c -lgmp -DGMP
+- $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} -o lpdemo2 lpdemo2.c lrslib.c lrsdriver.c lrsgmp.c -lgmp -DGMP
+- $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} -o vedemo vedemo.c lrslib.c lrsdriver.c lrsgmp.c -lgmp -DGMP
+- $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} -o chdemo chdemo.c lrslib.c lrsdriver.c lrsgmp.c -lgmp -DGMP
++ $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o lpdemo1 lpdemo1.c lrslib.c lrsdriver.c lrsgmp.c -lgmp -DGMP
++ $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o lpdemo lpdemo.c lrslib.c lrsdriver.c lrsgmp.c -lgmp -DGMP
++ $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o lpdemo2 lpdemo2.c lrslib.c lrsdriver.c lrsgmp.c -lgmp -DGMP
++ $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o vedemo vedemo.c lrslib.c lrsdriver.c lrsgmp.c -lgmp -DGMP
++ $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o chdemo chdemo.c lrslib.c lrsdriver.c lrsgmp.c -lgmp -DGMP
+
+ lrsnash: lrsnash.c nashdemo.c lrsnashlib.c lrslib.c lrsnashlib.h lrslib.h lrsgmp.c lrsgmp.h lrslong.h lrsdriver.h lrsdriver.c
+- $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} -o lrsnashgmp lrsnash.c lrsnashlib.c lrslib.c lrsgmp.c lrsdriver.c -lgmp -DGMP
+- $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} -o lrsnash1 lrsnash.c lrsnashlib.c lrslib.c lrslong.c lrsdriver.c -DLRSLONG -DSAFE
+- $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} -o lrsnash2 lrsnash.c lrsnashlib.c lrslib.c lrslong.c lrsdriver.c -DLRSLONG -DSAFE ${BITS}
+- $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} -o nashdemo nashdemo.c lrsnashlib.c lrslib.c lrsgmp.c lrsdriver.c -lgmp -DGMP
+- $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} -o 2nash 2nash.c
++ $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o lrsnashgmp lrsnash.c lrsnashlib.c lrslib.c lrsgmp.c lrsdriver.c -lgmp -DGMP
++ $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o lrsnash1 lrsnash.c lrsnashlib.c lrslib.c lrslong.c lrsdriver.c -DLRSLONG -DSAFE
++ $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o lrsnash2 lrsnash.c lrsnashlib.c lrslib.c lrslong.c lrsdriver.c -DLRSLONG -DSAFE ${BITS}
++ $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o nashdemo nashdemo.c lrsnashlib.c lrslib.c lrsgmp.c lrsdriver.c -lgmp -DGMP
++ $(CC) -O3 -I${INCLUDEDIR} -L${LIBDIR} $(LDFLAGS) -o 2nash 2nash.c
+ cp lrsnashgmp lrsnash
+
+ fel: fel.c lrslib.h lrslib.c lrsgmp.h lrsgmp.c lrslong.c
+- $(CC) -O3 -Wall -DGMP -I${INCLUDEDIR} fel.c lrslib.c lrsdriver.c lrsgmp.c -L${LIBDIR} -lgmp -o felgmp
+- $(CC) -O3 -Wall -I${INCLUDEDIR} fel.c lrslib.c lrsdriver.c lrslong.c -L${LIBDIR} -DLRSLONG -DSAFE -o fel1
+- $(CC) -O3 -Wall -I${INCLUDEDIR} fel.c lrslib.c lrsdriver.c lrslong.c -L${LIBDIR} -DLRSLONG -DSAFE ${BITS} -o fel2
++ $(CC) -O3 -Wall -DGMP -I${INCLUDEDIR} fel.c lrslib.c lrsdriver.c lrsgmp.c -L${LIBDIR} -lgmp $(LDFLAGS) -o felgmp
++ $(CC) -O3 -Wall -I${INCLUDEDIR} fel.c lrslib.c lrsdriver.c lrslong.c -L${LIBDIR} -DLRSLONG -DSAFE $(LDFLAGS) -o fel1
++ $(CC) -O3 -Wall -I${INCLUDEDIR} fel.c lrslib.c lrsdriver.c lrslong.c -L${LIBDIR} -DLRSLONG -DSAFE ${BITS} $(LDFLAGS) -o fel2
+
+ ######################################################################
+ # From here on the author is David Bremner <bremner@unb.ca> to whom you should turn for help
+@@ -228,7 +228,7 @@ SHLIBBIN=lrs-shared lrsnash-shared
+ # Building (linking) the shared library, and relevant symlinks.
+
+ ${SHLIB}: ${SHLIBOBJ}
+- $(CC) -shared -Wl,-soname=$(SONAME) $(SHLIBFLAGS) -o $@ ${SHLIBOBJ} -lgmp
++ $(CC) -shared -Wl,-soname=$(SONAME) $(SHLIBFLAGS) $(LDFLAGS) -o $@ ${SHLIBOBJ} -lgmp
+
+ ${SONAME}: ${SHLIB}
+ ln -sf ${SHLIB} ${SONAME}
+@@ -241,11 +241,11 @@ ${SHLINK}: ${SONAME}
+ all-shared: ${SHLIBBIN}
+
+ lrs-shared: ${SHLINK} lrs-shared.o
+- $(CC) $^ -o $@ -L . -llrs
++ $(CC) $^ $(LDFLAGS) -o $@ -L . -llrs
+
+
+ lrsnash-shared: ${SHLINK} lrsnash.c
+- $(CC) ${CFLAGS} -DGMP -DMA lrsnash.c lrsnashlib.c -I${INCLUDEDIR} -o $@ -L . -llrs -lgmp
++ $(CC) ${CFLAGS} -DGMP -DMA lrsnash.c lrsnashlib.c -I${INCLUDEDIR} $(LDFLAGS) -o $@ -L . -llrs -lgmp
+
+ # driver object files
+
+--
+2.32.0
+