blob: 4f4441bbe9746137ddbc77209daeb548a8af1ee4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
--- old/Makefile.spack
+++ new/Makefile.spack
@@ -0,0 +1,59 @@
+# Set PREFIX to the install location for both building and installing
+# Set GMP_PREFIX to the location where GMP is installed
+
+SRCS = \
+ bliss_C.cc \
+ defs.cc \
+ graph.cc \
+ heap.cc \
+ orbit.cc \
+ partition.cc \
+ timer.cc \
+ uintseqhash.cc \
+ utils.cc
+
+all: libbliss.la bliss libbliss_gmp.la bliss_gmp
+
+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: 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 -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/bliss
+ 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 bignum.hh $(PREFIX)/include/bliss/bignum.hh
+ libtool --mode=install cp bliss_C.h $(PREFIX)/include/bliss/bliss_C.h
+ libtool --mode=install cp defs.hh $(PREFIX)/include/bliss/defs.hh
+ libtool --mode=install cp graph.hh $(PREFIX)/include/bliss/graph.hh
+ libtool --mode=install cp heap.hh $(PREFIX)/include/bliss/heap.hh
+ libtool --mode=install cp kqueue.hh $(PREFIX)/include/bliss/kqueue.hh
+ libtool --mode=install cp kstack.hh $(PREFIX)/include/bliss/kstack.hh
+ libtool --mode=install cp orbit.hh $(PREFIX)/include/bliss/orbit.hh
+ libtool --mode=install cp partition.hh \
+ $(PREFIX)/include/bliss/partition.hh
+ libtool --mode=install cp timer.hh $(PREFIX)/include/bliss/timer.hh
+ libtool --mode=install cp uintseqhash.hh \
+ $(PREFIX)/include/bliss/uintseqhash.hh
+ libtool --mode=install cp utils.hh $(PREFIX)/include/bliss/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
|