diff --git a/xwords4/android/XWords4/jni/Android.mk b/xwords4/android/XWords4/jni/Android.mk index b0c291a38..e72775ddb 100644 --- a/xwords4/android/XWords4/jni/Android.mk +++ b/xwords4/android/XWords4/jni/Android.mk @@ -1,4 +1,4 @@ -# -*- mode: Makefile; compile-command: "cd ../; ${NDK_ROOT}/ndk-build -j3"; -*- +# -*- mode: Makefile; -*- LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) @@ -41,7 +41,7 @@ LOCAL_DEFINES += \ -DCOMMON_LAYOUT \ -DCOMMS_VERSION=1 \ -DINITIAL_CLIENT_VERS=${INITIAL_CLIENT_VERS} \ - -DVARIANT=\"${VARIANT}\" \ + -DVARIANT_${VARIANT} \ -DRELAY_ROOM_DEFAULT=\"\" \ -D__LITTLE_ENDIAN \ diff --git a/xwords4/android/XWords4/jni/xwjni.c b/xwords4/android/XWords4/jni/xwjni.c index 4beaceee0..00f0a2ddf 100644 --- a/xwords4/android/XWords4/jni/xwjni.c +++ b/xwords4/android/XWords4/jni/xwjni.c @@ -469,18 +469,17 @@ JNIEXPORT jstring JNICALL Java_org_eehouse_android_xw4_jni_XwJNI_comms_1getUUID ( JNIEnv* env, jclass C ) { - jstring jstr = NULL; + jstring jstr = #ifdef XWFEATURE_BLUETOOTH - const char* uuid; - if ( 0 == XP_STRCMP( VARIANT, "xw4" ) ) { - uuid = XW_BT_UUID; - } else if ( 0 == XP_STRCMP( VARIANT, "xw4dbg" ) ) { - uuid = XW_BT_UUID_DBG; - } else { - XP_ASSERT(0); - } - jstr = (*env)->NewStringUTF( env, uuid ); +# if defined VARIANT_xw4 + (*env)->NewStringUTF( env, XW_BT_UUID ) +# elif defined VARIANT_xw4dbg + (*env)->NewStringUTF( env, XW_BT_UUID_DBG ) +# endif +#else + NULL #endif + ; return jstr; }