Build Bliss both with and without GMP
This commit is contained in:
parent
71e92774eb
commit
d8b9cda632
@ -1,6 +1,6 @@
|
||||
--- old/Makefile.spack
|
||||
+++ new/Makefile.spack
|
||||
@@ -0,0 +1,35 @@
|
||||
@@ -0,0 +1,48 @@
|
||||
+# Set PREFIX to the install location for both building and installing
|
||||
+# Set GMP_PREFIX to the location where GMP is installed
|
||||
+
|
||||
@ -15,24 +15,37 @@
|
||||
+ uintseqhash.cc \
|
||||
+ utils.cc
|
||||
+
|
||||
+OBJS = $(SRCS:%.cc=%.lo)
|
||||
+all: libbliss.la bliss libbliss_gmp.la bliss_gmp
|
||||
+
|
||||
+all: libbliss_gmp.la bliss_gmp
|
||||
+
|
||||
+libbliss_gmp.la: $(OBJS)
|
||||
+libbliss.la: $(SRCS:%.cc=%.lo)
|
||||
+ libtool --mode=link --tag=CXX c++ -g -O3 \
|
||||
+ -rpath $(PREFIX)/lib -o $@ $^
|
||||
+libbliss_gmp.la: $(SRCS:%.cc=%.gmp.lo)
|
||||
+ libtool --mode=link --tag=CXX c++ -g -O3 \
|
||||
+ -rpath $(PREFIX)/lib -o $@ $^ -L$(GMP_PREFIX)/lib -lgmp
|
||||
+
|
||||
+bliss_gmp: bliss.lo libbliss_gmp.la
|
||||
+bliss: bliss.lo libbliss.la
|
||||
+ libtool --mode=link --tag=CXX c++ -g -O3 -o $@ $^
|
||||
+
|
||||
+bliss_gmp: bliss.gmp.lo libbliss_gmp.la
|
||||
+ libtool --mode=link --tag=CXX c++ -g -O3 -o $@ $^
|
||||
+
|
||||
+%.lo: %.cc
|
||||
+ libtool --mode=compile --tag=CXX c++ -g -O3 -DBLISS_USE_GMP -c $*.cc
|
||||
+ libtool --mode=compile --tag=CXX c++ -g -O3 -o $@ -c $*.cc
|
||||
+%.gmp.lo: %.cc
|
||||
+ libtool --mode=compile --tag=CXX c++ -g -O3 -o $@ \
|
||||
+ -c -DBLISS_USE_GMP $*.cc
|
||||
+
|
||||
+install:
|
||||
+ mkdir -p $(PREFIX)/bin
|
||||
+ mkdir -p $(PREFIX)/include
|
||||
+ mkdir -p $(PREFIX)/lib
|
||||
+ libtool --mode=install cp bliss $(PREFIX)/bin/bliss
|
||||
+ libtool --mode=install cp bliss_gmp $(PREFIX)/bin/bliss_gmp
|
||||
+ libtool --mode=install cp bliss_C.h $(PREFIX)/include/bliss_C.h
|
||||
+ libtool --mode=install cp graph.hh $(PREFIX)/include/graph.hh
|
||||
+ libtool --mode=install cp utils.hh $(PREFIX)/include/utils.hh
|
||||
+ libtool --mode=install cp libbliss.la $(PREFIX)/lib/libbliss.la
|
||||
+ libtool --mode=install cp libbliss_gmp.la $(PREFIX)/lib/libbliss_gmp.la
|
||||
+
|
||||
+.PHONY: all install
|
||||
|
Loading…
Reference in New Issue
Block a user