# Makefile to install GSL locally
# Version 1.0

ifneq ($(CC),g++)
CC = g++
endif

ifndef CFLAGS
CFLAGS 	= -Wall -ansi -pedantic -g
endif

ifndef RM
RM = rm -f -r
endif

#######################################################################
### FILES to install of GSL library: eventually to change with yours ## 

gslloc = $(PWD)/GSL

gsltar = ./gsl-1.15.tar.gz

gsldir = ./gsl-1.15/

#######################################################################

all: gsl 

gsl:$(gsltar)
	@echo "############################################################################"
	@echo "RELIADIFF: installing local GSL in $(gslloc) from $(gsltar)"
	@echo "############################################################################"
	@mkdir -p $(gslloc)
	@tar xzf $(gsltar)
	@cd $(gsldir) && ./configure --prefix="$(gslloc)"
	@$(MAKE) -C $(gsldir)
	@$(MAKE) install -C $(gsldir)

clean: 
	@echo "############################################################################"
	@echo "RELIADIFF: removing the GSL library installed in $(gslloc)!!!"
	@echo "############################################################################"
	@${RM} $(gsldir)
	@${RM} $(gslloc) 





	
	
