|
-
- LOCAL = $(PWD)
-
- # Arch-specifics
- include ../Makefile-arch.inc
- ifeq ($(ARCH),mac)
- export CFLAGS = -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk \
- -mmacosx-version-min=10.7
- export CXXFLAGS = $(CFLAGS)
- export LDFLAGS = $(CFLAGS)
- endif
-
- # Commands
- WGET = wget -nc
- UNTAR = tar xf
- UNZIP = unzip
-
- # Packages
- glew = glew-2.1.0
- glfw = glfw-3.2.1
- jansson = jansson-2.10
- libsamplerate = libsamplerate-0.1.9
- libcurl = curl-7.54.1
- libzip = libzip-1.2.0
- portmidi = portmidi
- portaudio = portaudio
-
-
- .NOTPARALLEL:
-
- all: $(glew) $(glfw) $(jansson) $(libsamplerate) $(libcurl) $(libzip) $(portmidi) $(portaudio)
-
- $(glew):
- $(WGET) https://downloads.sourceforge.net/project/glew/glew/$(patsubst glew-%,%,$@)/$@.tgz
- $(UNTAR) $@.tgz
- $(MAKE) -C $@
- ln -s lib lib64
- $(MAKE) -C $@ GLEW_DEST="$(LOCAL)" install
- rm lib64
-
- $(glfw):
- $(WGET) https://github.com/glfw/glfw/releases/download/$(patsubst glfw-%,%,$@)/$@.zip
- $(UNZIP) $@.zip
- cd $@ && cmake . \
- -DCMAKE_INSTALL_PREFIX="$(LOCAL)" -DBUILD_SHARED_LIBS=ON \
- -DGLFW_USE_CHDIR=ON -DGLFW_USE_MENUBAR=ON -DGLFW_USE_RETINA=ON
- $(MAKE) -C $@
- $(MAKE) -C $@ install
-
- $(jansson):
- $(WGET) http://www.digip.org/jansson/releases/$@.tar.gz
- $(UNTAR) $@.tar.gz
- cd $@ && ./configure --prefix="$(LOCAL)"
- $(MAKE) -C $@
- $(MAKE) -C $@ install
-
- $(libsamplerate):
- $(WGET) http://www.mega-nerd.com/SRC/$@.tar.gz
- $(UNTAR) $@.tar.gz
- cd $@ && ./configure --prefix="$(LOCAL)"
- $(MAKE) -C $@
- $(MAKE) -C $@ install
-
- $(libcurl):
- $(WGET) https://curl.haxx.se/download/$@.tar.gz
- $(UNTAR) $@.tar.gz
- cd $@ && ./configure --prefix="$(LOCAL)" \
- --disable-ftp --disable-file --disable-ldap --disable-ldaps --disable-rtsp --disable-proxy --disable-dict --disable-telnet --disable-tftp --disable-pop3 --disable-imap --disable-smb --disable-smtp --disable-gopher --disable-manual \
- --without-zlib --without-ssl --without-ca-bundle --without-ca-path --without-ca-fallback --without-libpsl --without-libmetalink --without-libssh2 --without-librtmp --without-winidn --without-libidn2 --without-nghttp2
- $(MAKE) -C $@
- $(MAKE) -C $@ install
-
- $(libzip):
- $(WGET) https://nih.at/libzip/$@.tar.gz
- $(UNTAR) $@.tar.gz
- cd $@ && ./configure --prefix="$(LOCAL)"
- $(MAKE) -C $@
- $(MAKE) -C $@ install
-
- $(portmidi):
- git clone https://github.com/AndrewBelt/portmidi.git $@
- # TODO Fix on Windows
- cd $@ && cmake . -DCMAKE_INSTALL_PREFIX="$(LOCAL)"
- $(MAKE) -C $@
- $(MAKE) -C $@ install
-
- $(portaudio):
- $(WGET) http://www.portaudio.com/archives/pa_stable_v190600_20161030.tgz
- $(UNTAR) pa_stable_v190600_20161030.tgz
- cd $@ && ./configure --prefix="$(LOCAL)"
- $(MAKE) -C $@
- $(MAKE) -C $@ install
-
- clean:
- git clean -fdxi
|