Added gtest.
authorDaniel G <giri@nwrk.biz>
Tue, 22 Jan 2019 01:51:24 +0000 (02:51 +0100)
committerDaniel G <giri@nwrk.biz>
Tue, 22 Jan 2019 01:51:24 +0000 (02:51 +0100)
_template/packages/googletest/.gitignore [new file with mode: 0644]
_template/packages/googletest/Makefile [new file with mode: 0644]
_template/packages/googletest/googletest-release-1.8.1.zip [new file with mode: 0644]

diff --git a/_template/packages/googletest/.gitignore b/_template/packages/googletest/.gitignore
new file mode 100644 (file)
index 0000000..ae10544
--- /dev/null
@@ -0,0 +1 @@
+googletest-release-1.8.1/
diff --git a/_template/packages/googletest/Makefile b/_template/packages/googletest/Makefile
new file mode 100644 (file)
index 0000000..6878b7c
--- /dev/null
@@ -0,0 +1,40 @@
+############################################################################
+# 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 linux clean windows
+
+unpack:
+       unzip -o googletest-release-1.8.1.zip
+
+windows: unpack
+       cd $(WORKDIR)/googletest-release-1.8.1; \
+       autoreconf -vfi; \
+       ./configure CFLAGS="-m32 -mwindows" CXXFLAGS="-m32 -mwindows" LDFLAGS="-m32 -static-libgcc -static-libstdc++" --host=i686-w64-mingw32 --disable-pthreads --with-pthreads=no; \
+       make -j4
+       mkdir -p $(WORKDIR)/../../include
+       mkdir -p $(WORKDIR)/../../lib/mingw32
+       cp -rf $(WORKDIR)/googletest-release-1.8.1/googletest/include/gtest $(WORKDIR)/../../include
+       cp -rf $(WORKDIR)/googletest-release-1.8.1/googlemock/include/gmock $(WORKDIR)/../../include
+       cp $(WORKDIR)/googletest-release-1.8.1/googletest/lib/.libs/libgtest.a $(WORKDIR)/../../lib/mingw32
+       cp $(WORKDIR)/googletest-release-1.8.1/googlemock/lib/.libs/libgmock.a $(WORKDIR)/../../lib/mingw32
+
+linux: unpack
+       cd $(WORKDIR)/googletest-release-1.8.1; \
+       autoreconf -vfi; \
+       ./configure CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32 -static-libgcc -static-libstdc++"; \
+       make -j4
+       mkdir -p $(WORKDIR)/../../include
+       mkdir -p $(WORKDIR)/../../lib/linux32
+       cp -rf $(WORKDIR)/googletest-release-1.8.1/googletest/include/gtest $(WORKDIR)/../../include
+       cp -rf $(WORKDIR)/googletest-release-1.8.1/googlemock/include/gmock $(WORKDIR)/../../include
+       cp $(WORKDIR)/googletest-release-1.8.1/googletest/lib/.libs/libgtest.a $(WORKDIR)/../../lib/linux32
+       cp $(WORKDIR)/googletest-release-1.8.1/googlemock/lib/.libs/libgmock.a $(WORKDIR)/../../lib/linux32
+
+clean:
+       cd $(WORKDIR)/googletest-release-1.8.1; \
+       make clean
diff --git a/_template/packages/googletest/googletest-release-1.8.1.zip b/_template/packages/googletest/googletest-release-1.8.1.zip
new file mode 100644 (file)
index 0000000..457af9b
Binary files /dev/null and b/_template/packages/googletest/googletest-release-1.8.1.zip differ