--- /dev/null
+# libgoogletest Makefile.uk
+#
+# Authors: Vlad-Andrei Badoiu <vlad_andrei.badoiu@stud.acs.upb.ro>
+#
+# Copyright (c) 2019, Politehnica University of Bucharest. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of the copyright holder nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+# THIS HEADER MAY NOT BE EXTRACTED OR MODIFIED IN ANY WAY.
+#
+
+################################################################################
+# Library registration
+################################################################################
+$(eval $(call addlib_s,libgoogletest,$(CONFIG_LIBGOOGLETEST)))
+
+################################################################################
+# Sources
+################################################################################
+LIBGOOGLETEST_VERSION=1.8.1
+LIBGOOGLETEST_URL=https://github.com/google/googletest/archive/release-$(LIBGOOGLETEST_VERSION).zip
+$(eval $(call fetch,libgoogletest,$(LIBGOOGLETEST_URL)))
+
+################################################################################
+# Helpers
+################################################################################
+LIBGOOGLETEST_SUBDIR=googletest-release-$(LIBGOOGLETEST_VERSION)
+LIBGOOGLETEST_SRC = $(LIBGOOGLETEST_ORIGIN)/$(LIBGOOGLETEST_SUBDIR)
+
+################################################################################
+# Library includes
+################################################################################
+CINCLUDES-$(CONFIG_LIBGOOGLETEST) += -I$(LIBGOOGLETEST_SRC)/googletest/
+CINCLUDES-$(CONFIG_LIBGOOGLETEST) += -I$(LIBGOOGLETEST_SRC)/googletest/include
+
+CXXINCLUDES-$(CONFIG_LIBGOOGLETEST) += -I$(LIBGOOGLETEST_SRC)/googletest/
+CXXINCLUDES-$(CONFIG_LIBGOOGLETEST) += -I$(LIBGOOGLETEST_SRC)/googletest/include
+
+################################################################################
+# Global flags
+################################################################################
+CONFIG_FLAGS += -D GTEST_HAS_CXXABI_H_ -D GTEST_LANG_CXX11
+LIBGOOGLETEST_CFLAGS-y += $(CONFIG_FLAGS)
+LIBGOOGLETEST_CXXFLAGS-y += $(CONFIG_FLAGS)
+
+################################################################################
+# Library sources
+################################################################################
+ifdef CONFIG_LIBGOOGLETEST_BUILD_MAIN
+LIBGOOGLETEST_SRCS-y += $(LIBGOOGLETEST_SRC)/googletest/src/gtest_main.cc
+endif
+LIBGOOGLETEST_SRCS-y += $(LIBGOOGLETEST_SRC)/googletest/src/gtest-all.cc
googletest for Unikraft
===================
-Please refer to the `README.md` as well as the documentation in the `doc/`
-subdirectory of the main unikraft repository.
+This is the port of googletest to Unikraft as an external
+library. libcxx is required. This library should come at the end of
+the dependency list, e.g.,:
+
+ ...:$(UK_LIBS)/libunwind:$(UK_LIBS)/compiler-rt:$(UK_LIBS)/libcxxabi:
+ $(UK_LIBS)/libcxx:$(UK_LIBS)/newlib:$(UK_LIBS)/googletest:...
+
+This library has a config option called LIBGOOGLETEST_BUILD_MAIN that
+builds the gtest_main.cc file. This is because some libraries do not
+have any main function in their unit tests and expect googletest to
+provide it.
+
+Please refer to the `README.md` as well as the documentation in the
+`doc/` subdirectory of the main unikraft repository for further
+information.
+