Build Bliss both with and without GMP
This commit is contained in:
		| @@ -1,6 +1,6 @@ | |||||||
| --- old/Makefile.spack | --- old/Makefile.spack | ||||||
| +++ new/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 PREFIX to the install location for both building and installing | ||||||
| +# Set GMP_PREFIX to the location where GMP is installed | +# Set GMP_PREFIX to the location where GMP is installed | ||||||
| + | + | ||||||
| @@ -15,24 +15,37 @@ | |||||||
| +	uintseqhash.cc				\ | +	uintseqhash.cc				\ | ||||||
| +	utils.cc | +	utils.cc | ||||||
| + | + | ||||||
| +OBJS = $(SRCS:%.cc=%.lo) | +all: libbliss.la bliss libbliss_gmp.la bliss_gmp | ||||||
| + | + | ||||||
| +all: libbliss_gmp.la bliss_gmp | +libbliss.la: $(SRCS:%.cc=%.lo) | ||||||
| + | +	libtool --mode=link --tag=CXX c++ -g -O3			\ | ||||||
| +libbliss_gmp.la: $(OBJS) | +		-rpath $(PREFIX)/lib -o $@ $^ | ||||||
|  | +libbliss_gmp.la: $(SRCS:%.cc=%.gmp.lo) | ||||||
| +	libtool --mode=link --tag=CXX c++ -g -O3			\ | +	libtool --mode=link --tag=CXX c++ -g -O3			\ | ||||||
| +		-rpath $(PREFIX)/lib -o $@ $^ -L$(GMP_PREFIX)/lib -lgmp | +		-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 $@ $^ | +	libtool --mode=link --tag=CXX c++ -g -O3 -o $@ $^ | ||||||
| + | + | ||||||
| +%.lo: %.cc | +%.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: | +install: | ||||||
| +	mkdir -p $(PREFIX)/bin | +	mkdir -p $(PREFIX)/bin | ||||||
|  | +	mkdir -p $(PREFIX)/include | ||||||
| +	mkdir -p $(PREFIX)/lib | +	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_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 | +	libtool --mode=install cp libbliss_gmp.la $(PREFIX)/lib/libbliss_gmp.la | ||||||
| + | + | ||||||
| +.PHONY: all install | +.PHONY: all install | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Erik Schnetter
					Erik Schnetter