summaryrefslogtreecommitdiff
path: root/jni/fluidsynth.mk
blob: 55e5b1b9fd9fa0a28d5fdd454c70d01be253ed7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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)