CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

| Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

Views: 418346
ifndef ABI
 ABI=64
endif
CFLAGS=-Wall -g -O2  -g -O2  $(COPTS)
LDFLAGS= -g  -export-dynamic $(LOPTS)
CC=gcc
CXX=g++
GAPARCH=x86_64-pc-linux-gnu-gcc-default64
MPFRVER=2.3.1
ifdef CXX
GMP_EXTRA_FLAGS=--enable-cxx
else
GMP_EXTRA_FLAGS=
endif

all: $(MAKE_GMP)

all_gmp_mpfr: $(MAKE_GMP) mpfr

../../../extern/gmp-5.0.5: ../../../extern/gmp-5.0.5.tar.gz
	( cd ../../../extern; tar zxvf gmp-5.0.5.tar.gz )

../../../extern/gmp-6.0.0a: ../../../extern/gmp-6.0.0a.tar.bz2
	( cd ../../../extern; tar jxvf gmp-6.0.0a.tar.bz2; mv gmp-6.0.0 gmp-6.0.0a )

gmp_config: ../../../extern/gmp-$(GMP_VER)
	@mkdir -p gmp-$(GMP_VER)
	@( cd ../../../extern/gmp-$(GMP_VER); \
	   gmp_conf=no; \
	   if test -r Makefile; then \
	    if ! test -r LASTBUILD.$(GAPARCH); then \
	     make distclean; \
	     gmp_conf=yes; \
	    fi; \
	   else \
	    gmp_conf=yes; \
	   fi; \
	   if test "$$gmp_conf" = "yes"; then \
	    echo ""; \
	    echo "Configuring GMP. Logging to bin/$(GAPARCH)/extern/gmp-$(GMP_VER)/build_log. Please wait... "; \
	    echo ""; \
	    ./configure --prefix=`pwd`/../../bin/$(GAPARCH)/extern/gmp-$(GMP_VER) $(GMP_EXTRA_FLAGS) ABI=$(ABI) \
	     > ../../bin/$(GAPARCH)/extern/gmp-$(GMP_VER)/build_log 2>&1; \
	    rm -f LASTBUILD*; \
	    touch LASTBUILD.$(GAPARCH); \
	   fi; )

gmp_build: gmp_config
	@( cd ../../../extern/gmp-$(GMP_VER); \
	   echo "" ;\
	    echo "Building GMP. Logging to bin/$(GAPARCH)/extern/gmp-$(GMP_VER)/build_log. Please wait... "; \
	   echo "" ;\
	    $(MAKE) >> ../../bin/$(GAPARCH)/extern/gmp-$(GMP_VER)/build_log 2>&1 ; \
	   if ! test -r ../../bin/$(GAPARCH)/extern/gmp-$(GMP_VER)/MAKE_CHECK_PASSED; then \
	    ( echo "" ;\
	      echo "Checking GMP. Logging to bin/$(GAPARCH)/extern/gmp-$(GMP_VER)/build_log. Please wait... "; \
	      echo "" ; \
	      $(MAKE) check >> ../../bin/$(GAPARCH)/extern/gmp-$(GMP_VER)/build_log 2>&1 ; \
	      if ! [ $$? -eq 0 ] ; then \
	       ( echo "" ;\
	         echo "***Error: GMP self-check has failed. See bin/$(GAPARCH)/extern/gmp-$(GMP_VER)/build_log for details.***"; \
	         echo "" ;\
		 exit 1 ); \
	      else \
	       touch ../../bin/$(GAPARCH)/extern/gmp-$(GMP_VER)/MAKE_CHECK_PASSED; \
	      fi; ) \
	   fi )

gmp: gmp_build 
	@( cd ../../../extern/gmp-$(GMP_VER); \
	    echo ""; \
	    echo "Installing GMP in bin/$(GAPARCH)/extern/gmp-$(GMP_VER)/. Logging to bin/$(GAPARCH)/extern/gmp-$(GMP_VER)/build_log. Please wait... "; \
	    echo ""; \
	    $(MAKE) install >> ../../bin/$(GAPARCH)/extern/gmp-$(GMP_VER)/build_log 2>&1 )
	@( rm -f gmp; ln -s gmp-$(GMP_VER) gmp )