aboutsummaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorHugues Evrard <hevrard@users.noreply.github.com>2019-02-14 15:21:05 +0000
committerdan sinclair <dj2@everburning.com>2019-02-14 10:21:05 -0500
commitb053505276eb86fd23d17028f0c51d7a284d4a8f (patch)
treedb010c165f9617744639b84acdfa9de7238c278c /samples
parent4aed92c264a953d96a87c113ad51659e009d1217 (diff)
downloadamber-b053505276eb86fd23d17028f0c51d7a284d4a8f.tar.gz
Add compilation scaffolding for plain Android executable (#285)
Diffstat (limited to 'samples')
-rw-r--r--samples/Android.mk32
-rw-r--r--samples/jni/Application.mk18
2 files changed, 50 insertions, 0 deletions
diff --git a/samples/Android.mk b/samples/Android.mk
new file mode 100644
index 0000000..9d8033e
--- /dev/null
+++ b/samples/Android.mk
@@ -0,0 +1,32 @@
+# Copyright 2019 The Amber Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE:=amber_ndk
+LOCAL_CPP_EXTENSION := .cc .cpp .cxx
+LOCAL_SRC_FILES:= \
+ amber.cc \
+ config_helper.cc \
+ config_helper_vulkan.cc \
+ log.cc \
+ ppm.cc
+LOCAL_C_INCLUDES := $(LOCAL_PATH)/.. $(LOCAL_PATH)/../include
+LOCAL_LDLIBS:=-landroid -lvulkan -llog
+LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti -Werror -Wno-unknown-pragmas -DAMBER_ENGINE_VULKAN=1
+LOCAL_STATIC_LIBRARIES:=amber
+include $(BUILD_EXECUTABLE)
+
+include $(LOCAL_PATH)/../Android.mk
diff --git a/samples/jni/Application.mk b/samples/jni/Application.mk
new file mode 100644
index 0000000..549f512
--- /dev/null
+++ b/samples/jni/Application.mk
@@ -0,0 +1,18 @@
+# Copyright 2019 The Amber Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+APP_ABI := arm64-v8a # armeabi-v7a x86 x86_64
+APP_BUILD_SCRIPT := Android.mk
+APP_STL := c++_static
+APP_PLATFORM := android-24 # minimal version to get libvulkan