spack/var/spack/repos/builtin/packages/lrslib/Makefile.spack.patch
2016-06-19 13:47:02 -04:00

61 lines
2.4 KiB
Diff

--- old/Makefile.spack
+++ new/Makefile.spack
@@ -0,0 +1,57 @@
+# Set PREFIX to the install location for both building and installing
+# Set BOOST_PREFIX to the location where BOOST is installed
+# Set GMP_PREFIX to the location where GMP is installed
+
+all: liblrsgmp.la \
+ 2nash fourier lrs lrs1 lrsnash redund redund1 setnash setnash2
+
+liblrsgmp.la: lrslib-GMP.lo lrsgmp-GMP.lo
+ libtool --mode=link --tag=CC cc -g -O3 \
+ -rpath $(PREFIX)/lib -o $@ $^ \
+ -L$(GMP_PREFIX)/lib -lgmp
+
+lrs1: lrs-LONG.lo lrslib-LONG.lo lrslong-LONG.lo
+ libtool --mode=link --tag=CC cc -g -O3 -o $@ $^
+redund1: redund-LONG.lo lrslib-LONG.lo lrslong-LONG.lo
+ libtool --mode=link --tag=CC cc -g -O3 -o $@ $^
+lrs: lrs-GMP.lo lrslib-GMP.lo lrsmp-GMP.lo liblrsgmp.la
+ libtool --mode=link --tag=CC cc -g -O3 -o $@ $^
+redund: redund-GMP.lo lrslib-GMP.lo lrsmp-GMP.lo liblrsgmp.la
+ libtool --mode=link --tag=CC cc -g -O3 -o $@ $^
+fourier: fourier-GMP.lo lrslib-GMP.lo lrsgmp-GMP.lo liblrsgmp.la
+ libtool --mode=link --tag=CC cc -g -O3 -o $@ $^
+lrsnash: lrsnash-GMP.lo lrsnashlib-GMP.lo lrslib-GMP.lo lrsmp-GMP.lo \
+ liblrsgmp.la
+ libtool --mode=link --tag=CC cc -g -O3 -o $@ $^
+2nash: 2nash.lo
+ libtool --mode=link --tag=CC cc -g -O3 -o $@ $^
+setnash: setupnash.lo lrslib.lo lrsmp.lo
+ libtool --mode=link --tag=CC cc -g -O3 -o $@ $^
+setnash2: setupnash2.lo lrslib.lo lrsmp.lo
+ libtool --mode=link --tag=CC cc -g -O3 -o $@ $^
+
+%.lo: %.c
+ libtool --mode=compile --tag=CC cc -g -O3 -o $@ -c $*.c
+%-GMP.lo: %.c
+ libtool --mode=compile --tag=CC cc -g -O3 -o $@ -DGMP -c $*.c
+%-LONG.lo: %.c
+ libtool --mode=compile --tag=CC cc -g -O3 -o $@ -DLRSLONG -c $*.c
+
+install:
+ mkdir -p $(PREFIX)/bin
+ mkdir -p $(PREFIX)/include
+ mkdir -p $(PREFIX)/lib
+ libtool --mode=install cp 2nash $(PREFIX)/bin/2nash
+ libtool --mode=install cp fourier $(PREFIX)/bin/fourier
+ libtool --mode=install cp lrs $(PREFIX)/bin/lrs
+ libtool --mode=install cp lrs1 $(PREFIX)/bin/lrs1
+ libtool --mode=install cp lrsnash $(PREFIX)/bin/lrsnash
+ libtool --mode=install cp redund $(PREFIX)/bin/redund
+ libtool --mode=install cp redund1 $(PREFIX)/bin/redund1
+ libtool --mode=install cp setnash $(PREFIX)/bin/setnash
+ libtool --mode=install cp setnash2 $(PREFIX)/bin/setnash2
+ libtool --mode=install cp lrsgmp.h $(PREFIX)/include/lrsgmp.h
+ libtool --mode=install cp lrslib.h $(PREFIX)/include/lrslib.h
+ libtool --mode=install cp liblrsgmp.la $(PREFIX)/lib/liblrsgmp.la
+
+.PHONY: all install