Added libsndfile.
authorDaniel G <giri@nwrk.biz>
Tue, 22 Jan 2019 01:52:24 +0000 (02:52 +0100)
committerDaniel G <giri@nwrk.biz>
Tue, 22 Jan 2019 01:52:24 +0000 (02:52 +0100)
_template/packages/libsndfile/.gitignore [new file with mode: 0644]
_template/packages/libsndfile/Makefile [new file with mode: 0644]
_template/packages/libsndfile/libsndfile-1.0.28.tar.gz [new file with mode: 0644]

diff --git a/_template/packages/libsndfile/.gitignore b/_template/packages/libsndfile/.gitignore
new file mode 100644 (file)
index 0000000..252ef37
--- /dev/null
@@ -0,0 +1,7 @@
+# Ignore everything
+*
+
+# But not these files...
+!.gitignore
+!libsndfile-1.0.28.tar.gz
+!Makefile
\ No newline at end of file
diff --git a/_template/packages/libsndfile/Makefile b/_template/packages/libsndfile/Makefile
new file mode 100644 (file)
index 0000000..460fdb8
--- /dev/null
@@ -0,0 +1,42 @@
+############################################################################
+# Workfile: Makefile
+# Author: Daniel Giritzer, S1810567004 (daniel@giritzer.eu)
+# Date: 03.12.2018
+# Description: Universal Makefile for Unix based Operating Systems
+############################################################################
+WORKDIR = $(shell pwd)
+
+all: unpack windows clean linux
+
+.PHONY: unpack
+unpack:
+       tar xvzf libsndfile-1.0.28.tar.gz
+
+.PHONY: windows
+windows:
+       cd $(WORKDIR)/libsndfile-1.0.28; \
+       autoreconf -vfi; \
+       ./configure CFLAGS="-m32 -mconsole" CXXFLAGS="-m32 -mconsole" LDFLAGS="-m32 -static-libgcc -static-libstdc++ -lpthread" --host=i686-w64-mingw32; \
+       make -j4
+       mkdir -p $(WORKDIR)/../../include
+       mkdir -p $(WORKDIR)/../../lib/mingw32
+       cp -rf $(WORKDIR)/libsndfile-1.0.28/src/sndfile.h $(WORKDIR)/../../include
+       cp -rf $(WORKDIR)/libsndfile-1.0.28/src/.libs/libsndfile.a $(WORKDIR)/../../lib/mingw32
+       cp -rf $(WORKDIR)/libsndfile-1.0.28/src/.libs/libcommon.a $(WORKDIR)/../../lib/mingw32
+
+.PHONY: linux
+linux:
+       cd $(WORKDIR)/libsndfile-1.0.28; \
+       autoreconf -vfi; \
+       ./configure CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32 -static -static-libgcc -static-libstdc++"; \
+       make -j4
+       mkdir -p $(WORKDIR)/../../include
+       mkdir -p $(WORKDIR)/../../lib/linux32
+       cp -rf $(WORKDIR)/libsndfile-1.0.28/src/sndfile.h $(WORKDIR)/../../include
+       cp -rf $(WORKDIR)/libsndfile-1.0.28/src/.libs/libsndfile.a $(WORKDIR)/../../lib/linux32
+       cp -rf $(WORKDIR)/libsndfile-1.0.28/src/.libs/libcommon.a $(WORKDIR)/../../lib/linux32
+
+.PHONY: clean
+clean:
+       cd $(WORKDIR)/libsndfile-1.0.28; \
+       make clean
diff --git a/_template/packages/libsndfile/libsndfile-1.0.28.tar.gz b/_template/packages/libsndfile/libsndfile-1.0.28.tar.gz
new file mode 100644 (file)
index 0000000..a184f3b
Binary files /dev/null and b/_template/packages/libsndfile/libsndfile-1.0.28.tar.gz differ