gfxstream: meson qnx cross build

Pkgconfig wasn't able to resolve the dependencies for qnx build, so the
libraries and headers are found and added manually. Hopefully we can get
pkgconfig working soon to clean this up.

A `qnx` directory is added to the project root for qnx build scripts and
cross files. A script also handles the aemu dependency. Run 'make' to
build cross-compiled aemu deps, and then gfxstream.  Cmake toolchain
file is added for building the aemu dependancy.

BUG=287082350
TEST=qnx cross compile: cd qnx || make

Change-Id: I1793356c42bfbc65c285fc7da5b7f13461f9dd4e
diff --git a/qnx/common.mk b/qnx/common.mk
new file mode 100644
index 0000000..478ba15
--- /dev/null
+++ b/qnx/common.mk
@@ -0,0 +1,43 @@
+ifndef QCONFIG
+QCONFIG=qconfig.mk
+endif
+include $(QCONFIG)
+
+.PHONY: gfxstream
+.PHONY: aemu
+.PHONY: clean
+.PHONY: install
+
+all: gfxstream
+
+check-sdp:
+	@if [ -z "$${QNX_TARGET}" ]; then \
+		echo "'QNX_TARGET' not set. Make sure QNX SDP environment is configured"; \
+		exit 1; \
+	fi
+	@if [ -z "$${QNX_HOST}" ]; then \
+		echo "'QNX_HOST' not set. Make sure QNX SDP environment is configured"; \
+		exit 1; \
+	fi
+
+check-install-root:
+	@if [ -z "$${INSTALL_ROOT_nto}" ]; then \
+		echo "'INSTALL_ROOT_nto' not set."; \
+		exit 1; \
+	fi
+
+aemu: check-sdp
+	../build-aemu.sh
+
+gfxstream: check-sdp aemu
+	../build-gfxstream.sh
+
+install: check-sdp check-install-root gfxstream
+	$(MAKE) -f ../../pinfo.mk gfxstream/host/libgfxstream*.so
+	$(CP_HOST) -d gfxstream/host/libgfxstream*.so $(INSTALL_ROOT_nto)/$(VARIANT)/usr/lib/
+
+clean: check-install-root
+	rm -rf aemu
+	rm -rf gfxstream
+	rm *.pinfo
+	rm $(INSTALL_ROOT_nto)/$(VARIANT)/usr/lib/libgfxstream*