Added gl4es for android (openGL to openGLES translation library).
authorDaniel G <giri@nwrk.biz>
Tue, 5 Feb 2019 19:20:41 +0000 (20:20 +0100)
committerDaniel G <giri@nwrk.biz>
Tue, 5 Feb 2019 19:20:41 +0000 (20:20 +0100)
_template/Makefile
_template/packages/gl4es1.1.0/.gitignore [new file with mode: 0644]
_template/packages/gl4es1.1.0/Makefile [new file with mode: 0644]
_template/packages/gl4es1.1.0/gl4es-1.1.0.zip [new file with mode: 0644]

index 5d439d7..7540033 100644 (file)
@@ -56,6 +56,10 @@ alsa:
        cd $(WORKDIR)/packages/alsa-lib1.1.8; \
        make
 
+gl4es:
+       cd $(WORKDIR)/packages/gl4es1.1.0; \
+       make
+
 #### _template App
 _template:
        cd $(WORKDIR)/src; \
@@ -107,6 +111,10 @@ clean_alsa:
        cd $(WORKDIR)/packages/alsa-lib1.1.8; \
        make clean
 
+clean_gl4es:
+       cd $(WORKDIR)/packages/gl4es1.1.0; \
+       make clean
+
 clean__template:
        cd $(WORKDIR)/src; \
        make clean
@@ -155,4 +163,4 @@ android_package:
        mkdir -p $(WORKDIR)/install_package/
        cp $(WORKDIR)/src/bin/Android/_template.apk $(WORKDIR)/install_package/install__template_android.apk
 
-clean: clean_lib clean__template clean_fltk  clean_tinyxml clean_allegro clean_nanox clean_freetype clean_libsndfile clean_libao clean_boost clean_gtest clean_tinyalsa
+clean: clean_lib clean__template clean_fltk  clean_tinyxml clean_allegro clean_nanox clean_freetype clean_libsndfile clean_libao clean_boost clean_gtest clean_tinyalsa clean_gl4es
diff --git a/_template/packages/gl4es1.1.0/.gitignore b/_template/packages/gl4es1.1.0/.gitignore
new file mode 100644 (file)
index 0000000..ef4f3a6
--- /dev/null
@@ -0,0 +1,7 @@
+# Ignore everything
+/*
+
+# But not these files...
+!.gitignore
+!gl4es-1.1.0.zip
+!Makefile
\ No newline at end of file
diff --git a/_template/packages/gl4es1.1.0/Makefile b/_template/packages/gl4es1.1.0/Makefile
new file mode 100644 (file)
index 0000000..73e6ff6
--- /dev/null
@@ -0,0 +1,35 @@
+############################################################################
+# Workfile: Makefile
+# Author: Daniel Giritzer, S1810567004 (daniel@giritzer.eu)
+# Date: 03.12.2018
+# Description: Universal Makefile for Unix based Operating Systems
+############################################################################
+WORKDIR = $(shell pwd)
+
+# Add android ndk toolchain
+ANDROID_NDK_HOME=/usr/lib/android-ndk
+export PATH := $(ANDROID_NDK_HOME)/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/:$(PATH)
+
+all: unpack android_arm
+
+.PHONY: unpack
+unpack:
+       unzip -o gl4es-1.1.0.zip
+
+.PHONY: android_arm
+android_arm:
+       export NDK_PROJECT_PATH=$(WORKDIR); \
+       cp -r $(WORKDIR)/gl4es-1.1.0 $(WORKDIR)/jni; \
+       echo "APP_ABI := armeabi-v7a"> $(WORKDIR)/jni/Application.mk; \
+       /usr/lib/android-ndk/ndk-build
+       mkdir -p $(WORKDIR)/../../lib_include/android_arm
+       mkdir -p $(WORKDIR)/../../lib/android_arm
+       cp -rf $(WORKDIR)/gl4es-1.1.0/include/* $(WORKDIR)/../../lib_include/android_arm
+       cp $(WORKDIR)/obj/local/armeabi-v7a/libGL.a $(WORKDIR)/../../lib/android_arm
+
+.PHONY: clean
+clean:
+       rm -rf $(WORKDIR)/gl4es-1.1.0
+       rm -rf $(WORKDIR)/jni
+       rm -rf $(WORKDIR)/obj
+
diff --git a/_template/packages/gl4es1.1.0/gl4es-1.1.0.zip b/_template/packages/gl4es1.1.0/gl4es-1.1.0.zip
new file mode 100644 (file)
index 0000000..aa689d3
Binary files /dev/null and b/_template/packages/gl4es1.1.0/gl4es-1.1.0.zip differ