Release 时 LOG 不显示
This commit is contained in:
1 parent
d59685588b
commit
51f050ae7e
2 files changed
+22
-1
No files matched your search
+9
-1
@@ -175,6 +175,8 @@ include $(BUILD_STATIC_LIBRARY)
|
||||
##################################################
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
#RELEASE_FLAG := true
|
||||
|
||||
LOCAL_MODULE := libimage
|
||||
LOCAL_SRC_FILES := \
|
||||
image.c \
|
||||
@@ -184,6 +186,12 @@ gif.c \
|
||||
utils.c
|
||||
LOCAL_CFLAGS := -O3
|
||||
LOCAL_STATIC_LIBRARIES := libjpeg-turbo libpng libgif
|
||||
LOCAL_LDLIBS := -lGLESv2 -llog
|
||||
LOCAL_LDLIBS := -lGLESv2
|
||||
|
||||
ifdef RELEASE_FLAG
|
||||
LOCAL_CFLAGS += -DRELEASE
|
||||
else
|
||||
LOCAL_LDLIBS += -llog
|
||||
endif
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
+13
@@ -7,6 +7,17 @@
|
||||
#ifndef IMAGE_H_
|
||||
#define IMAGE_H_
|
||||
|
||||
#ifdef RELEASE
|
||||
|
||||
#define LOGV(...)
|
||||
#define LOGD(...)
|
||||
#define LOGI(...)
|
||||
#define LOGW(...)
|
||||
#define LOGE(...)
|
||||
#define LOGF(...)
|
||||
|
||||
#else
|
||||
|
||||
#define TAG "libimage"
|
||||
#define LOGV(...) __android_log_print(ANDROID_LOG_VERBOSE, TAG ,__VA_ARGS__)
|
||||
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, TAG ,__VA_ARGS__)
|
||||
@@ -15,6 +26,8 @@
|
||||
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, TAG ,__VA_ARGS__)
|
||||
#define LOGF(...) __android_log_print(ANDROID_LOG_FATAL, TAG ,__VA_ARGS__)
|
||||
|
||||
#endif /* RELEASE */
|
||||
|
||||
typedef unsigned char byte;
|
||||
|
||||
typedef struct {
|
||||
|
||||
Reference in new issue
Block a user