Skip to content

Instantly share code, notes, and snippets.

@ryardley
Last active January 5, 2019 10:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryardley/fea820b75e6e03dbe8184d3fb8ac077c to your computer and use it in GitHub Desktop.
Save ryardley/fea820b75e6e03dbe8184d3fb8ac077c to your computer and use it in GitHub Desktop.
# ./android/app/src/main/jni/Android.mk
# Set up paths
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
# Debug mode
NDK_DEBUG=1
# Specify C++ flags
LOCAL_CPPFLAGS := -std=c++14
LOCAL_CPPFLAGS += -fexceptions
LOCAL_CPPFLAGS += -frtti
LOCAL_CPPFLAGS += -Wall
LOCAL_CPPFLAGS += -Wextra
LOCAL_CPPFLAGS += -I$(LOCAL_PATH)/../../../../../djinni/jni
LOCAL_CPPFLAGS += -I$(LOCAL_PATH)/../../../../../djinni/cpp
LOCAL_CPPFLAGS += -I$(LOCAL_PATH)/../../../../../node_modules/djinni/support-lib/jni
LOCAL_CPPFLAGS += -I$(LOCAL_PATH)/../../../../../node_modules/djinni/support-lib
LOCAL_CPPFLAGS += -I$(LOCAL_PATH)/../../../../../src/cpp
# Specify sourc files
LOCAL_SRC_FILES += $(LOCAL_PATH)/../../../../../djinni/jni/NativeHelloWorld.cpp
LOCAL_SRC_FILES += $(wildcard $(LOCAL_PATH)/../../../../../src/cpp/*.cpp)
LOCAL_SRC_FILES += $(wildcard $(LOCAL_PATH)/../../../../../node_modules/djinni/support-lib/jni/*.cpp)
LOCAL_SRC_FILES += $(wildcard $(LOCAL_PATH)/../../../../../node_modules/djinni/support-lib/*.cpp)
# Specify module name for System.loadLibrary() call
LOCAL_MODULE := helloworld
# Telling make to build the library
include $(BUILD_SHARED_LIBRARY)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment