summaryrefslogtreecommitdiff
path: root/jni/fluidsynth.mk
diff options
context:
space:
mode:
authorJari Vetoniemi <jari.vetoniemi@indooratlas.com>2020-03-16 18:49:26 +0900
committerJari Vetoniemi <jari.vetoniemi@indooratlas.com>2020-03-30 00:39:06 +0900
commitfcbf63e62c627deae76c1b8cb8c0876c536ed811 (patch)
tree64cb17de3f41a2b6fef2368028fbd00349946994 /jni/fluidsynth.mk
Fresh start
Diffstat (limited to 'jni/fluidsynth.mk')
-rw-r--r--jni/fluidsynth.mk20
1 files changed, 20 insertions, 0 deletions
diff --git a/jni/fluidsynth.mk b/jni/fluidsynth.mk
new file mode 100644
index 0000000..55e5b1b
--- /dev/null
+++ b/jni/fluidsynth.mk
@@ -0,0 +1,20 @@
+include $(CLEAR_VARS)
+LOCAL_MODULE := fluidsynth
+LOCAL_C_INCLUDES := jni/fluidsynth/include jni/fluidsynth/src/bindings jni/fluidsynth/src/drivers jni/fluidsynth/src/midi \
+ jni/fluidsynth/src/rvoice jni/fluidsynth/src/sfloader jni/fluidsynth/src/synth jni/fluidsynth/src/utils
+LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
+LOCAL_CFLAGS := -DHAVE_STRING_H -DHAVE_STDLIB_H -DHAVE_STDIO_H -DHAVE_MATH_H -DHAVE_ERRNO_H -DHAVE_UNISTD_H -DHAVE_FCNTL_H \
+ -DHAVE_SYS_TYPES_H -DHAVE_SYS_STAT_H -DHAVE_PTHREAD_H -DHAVE_LIMITS_H -DHAVE_ARPA_INET_H -DHAVE_SYS_SOCKET_H \
+ -DDEFAULT_SOUNDFONT=\"\" -DVERSION=\"1.0.0\"
+LOCAL_SRC_FILES := $(wildcard jni/fluidsynth/bindings/*.c jni/fluidsynth/drivers/*.c jni/fluidsynth/midi/*.c jni/fluidsynth/rvoice/*.c \
+ jni/fluidsynth/sfloader/*.c jni/fluidsynth/synth/*.c jni/fluidsynth/utils/*.c) jni/fluidsynth/src/fluidsynth.c
+LOCAL_STATIC_LIBRARIES := libglib-2.0 libgthread-2.0
+
+jni/fluidsynth/include/fluidsynth.h: jni/fluidsynth/include/fluidsynth.cmake
+ sed 's/#cmakedefine01 BUILD_SHARED_LIBS/#define BUILD_SHARED_LIBS 0/' $^ > $@
+
+jni/fluidsynth/include/fluidsynth/version.h: jni/fluidsynth/include/fluidsynth/version.h.in
+ sed 's/@FLUIDSYNTH_VERSION@/"2.1.0"/;s/@FLUIDSYNTH_VERSION_MAJOR@/2/;s/@FLUIDSYNTH_VERSION_MINOR@/1/;s/@FLUIDSYNTH_VERSION_MICRO@/1/' $^ > $@
+
+mkxp: jni/fluidsynth/include/fluidsynth.h jni/fluidsynth/include/fluidsynth/version.h
+include $(BUILD_STATIC_LIBRARY)