Last active
August 15, 2018 00:55
-
-
Save jgoldfar/37312d6ee5834d85542b1e0b35e8db94 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SHELL=/bin/bash | |
PWD=$(shell pwd) | |
export INSTALLDIR?=$(PWD)/../usr | |
SRCDEPS=fftw-3.3.7 \ | |
glpk-4.65 \ | |
pcre2-10.31 \ | |
readline-8.0-alpha \ | |
bison-3.0.4 \ | |
curl-7.60.0 \ | |
gawk-4.2.1 \ | |
sed-4.5 \ | |
SuiteSparse-5.2.0 \ | |
qhull-2015-src-7.2.0 \ | |
gl2ps-1.4.0 \ | |
qrupdate-1.1.2 \ | |
icoutils-0.32.3 \ | |
OpenBLAS-0.2.20 | |
#install-%: %.tar.gz | |
# tar -xvzf $< | |
# cd $* && ./configure --prefix=$(INSTALLDIR) | |
# cd $* && make && make install | |
#install-%: %.tar.xz | |
# tar -xvJf $< | |
# cd $* && ./confgure --prefix=$(INSTALLDIR) | |
# cd $* && make && make install | |
install-OpenBLAS-0.2.20: OpenBLAS-0.2.20.tar.gz | |
if [[ ! -f "$(INSTALLDIR)/include/openblas_config.h" ]] ; then \ | |
tar -xvzf $< ; \ | |
cd OpenBLAS-0.2.20 && \ | |
make USE_THREAD=0 CPPFLAGS="-I$(INSTALLDIR)/usr/include" CFLAGS="-O2 -march=native" CXXFLAGS="-O2 -march=native" FFLAGS="-O2 -march=native" LDFLAGS="-L$(INSTALLDIR)/usr/lib64 -Wl,-rpath,$(INSTALLDIR)/usr/lib64" && \ | |
make PREFIX=$(INSTALLDIR) install ; \ | |
fi | |
## icotools | |
install-icoutils-0.32.3: icoutils-0.32.3.tar.bz2 | |
if [[ ! -f "$(INSTALLDIR)/bin/icotool" ]] ; then \ | |
tar -xvjf $< ; \ | |
cd icoutils-0.32.3 && \ | |
./configure --prefix=$(INSTALLDIR) && \ | |
make && \ | |
make install ; \ | |
fi | |
## PCRE | |
install-pcre2-10.31: pcre2-10.31.tar.gz | |
if [[ ! -f "$(INSTALLDIR)/lib/libpcre2-8.a" ]] ; then \ | |
tar -xvzf $< ; \ | |
cd pcre2-10.31 && ./configure --prefix=$(INSTALLDIR) ; \ | |
make && make install ; \ | |
fi | |
## Bison | |
install-bison-3.0.4: bison-3.0.4.tar.xz | |
if [[ ! -f "$(INSTALLDIR)/bin/bison" ]] ; then \ | |
tar -xvJf $< ; \ | |
cd bison-3.0.4 && ./configure --prefix=$(INSTALLDIR) ; \ | |
make && make install ; \ | |
fi | |
## Sed | |
install-sed-4.5: sed-4.5.tar.xz | |
if [[ ! -f "$(INSTALLDIR)/bin/sed" ]] ; then \ | |
tar -xvJf $< ; \ | |
cd sed-4.5 && ./configure --prefix=$(INSTALLDIR) --with-included-regex --with-included-gettext ; \ | |
make && make install ; \ | |
fi | |
## Awk | |
install-gawk-4.2.1: gawk-4.2.1.tar.xz | |
if [[ ! -f "$(INSTALLDIR)/bin/gawk" ]] ; then \ | |
tar -xvJf $< ; \ | |
cd gawk-4.2.1 && ./configure --prefix=$(INSTALLDIR) --disable-nls ; \ | |
make && make install ; \ | |
fi | |
## Readline | |
install-readline-8.0-alpha: readline-8.0-alpha.tar.gz | |
if [[ ! -f "$(INSTALLDIR)/lib/libreadline.a" ]] ; then \ | |
tar -xvzf $< ; \ | |
cd readline-8.0-alpha && ./configure --prefix=$(INSTALLDIR) --enable-shared ; \ | |
make && make install ; \ | |
fi | |
## FFTW | |
install-fftw-3.3.7: fftw-3.3.7.tar.gz | |
if [[ ! -f "$(INSTALLDIR)/lib/libfftw3.a" ]] ; then \ | |
tar -xvzf $< ; \ | |
cd fftw-3.3.7 && ./configure --prefix=$(INSTALLDIR) --enable-shared && \ | |
make && make check && make install && \ | |
./configure --prefix=$(INSTALLDIR) --enable-shared --enable-float --enable-sse && \ | |
make install ; \ | |
fi | |
## Curl | |
install-curl-7.60.0: curl-7.60.0.tar.xz | |
if [[ ! -f "$(INSTALLDIR)/lib/libcurl.a" ]] ; then \ | |
tar -xvJf $< ; \ | |
cd curl-7.60.0 && ./configure --prefix=$(INSTALLDIR) --enable-shared ; \ | |
make && make check && make install ; \ | |
fi | |
## GLPK | |
install-glpk-4.65: glpk-4.65.tar.gz | |
if [[ ! -f "$(INSTALLDIR)/lib/libglpk.a" ]] ; then \ | |
tar -xvzf $< ; \ | |
cd glpk-4.65 && ./configure --prefix=$(INSTALLDIR) --enable-shared ; \ | |
make && make check && make install ; \ | |
fi | |
## SuiteSparse | |
install-SuiteSparse-5.2.0: SuiteSparse-5.2.0.tar.gz | |
if [[ ! -f "$(INSTALLDIR)/lib/libgraphblas.a" ]] ; then \ | |
tar xvzf $< ; \ | |
cd SuiteSparse && make && make cx && make install INSTALL=$(INSTALLDIR) ; \ | |
fi | |
## QHull | |
install-qhull-2015-src-7.2.0: qhull-2015-src-7.2.0.tgz | |
if [[ ! -f "$(INSTALLDIR)/bin/qhull" ]] ; then \ | |
tar xvzf $< ; \ | |
cd qhull-2015.2 && \ | |
mkdir -p build && cd build && \ | |
cmake -DCMAKE_INSTALL_PREFIX=$(INSTALLDIR) -DCMAKE_BUILD_TYPE=Release .. && \ | |
make && \ | |
make install ; \ | |
fi | |
## GL2PS | |
install-gl2ps-1.4.0: gl2ps-1.4.0.tgz | |
if [[ ! -f "$(INSTALLDIR)/lib/libgl2ps.a" ]] ; then \ | |
tar xvzf $< ; \ | |
cd gl2ps-1.4.0-source ; \ | |
cmake -DCMAKE_INSTALL_PREFIX=$(INSTALLDIR) . ; \ | |
make ; \ | |
make install ; \ | |
fi | |
## QRUpdate | |
# Note: make install doesn't work, even with PREFIX set. | |
install-qrupdate-1.1.2: qrupdate-1.1.2.tar.gz | |
if [[ ! -f "$(INSTALLDIR)/lib/libqrupdate.dylib" ]] ; then \ | |
tar xvzf $< ; \ | |
cd qrupdate-1.1.2 ; \ | |
patch -p0 < ../qrupdate-1.1.2_Makeconf.patch ; \ | |
make solib ; \ | |
cp libqrupdate.dylib $(INSTALLDIR)/lib/ ; \ | |
fi | |
install: $(addprefix install-,$(SRCDEPS)) | |
clean-deps: | |
$(foreach d,$(depsDirs),$(RM) -r $d) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment