From a7f78db6c4931119535059acc263f49c044421e0 Mon Sep 17 00:00:00 2001 From: radius Date: Mon, 14 Nov 2016 22:23:48 -0500 Subject: [PATCH] build with DEBUG=1 on android for now --- Makefile | 4 ++++ jni/Android.mk | 11 ++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ef1b3ca..9a8885c 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ DEBUG = 0 +GIT_VERSION := " $(shell git describe --dirty --always --tags)" ifeq ($(platform),) platform = unix @@ -239,6 +240,9 @@ else endif +CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\" +CXXFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\" + ifeq ($(DEBUG), 1) CFLAGS += -O0 -g CXXFLAGS += -O0 -g diff --git a/jni/Android.mk b/jni/Android.mk index 4647d9b..7c1188c 100644 --- a/jni/Android.mk +++ b/jni/Android.mk @@ -1,4 +1,7 @@ +DEBUG = 1 + LOCAL_PATH := $(call my-dir) +GIT_VERSION := " $(shell git rev-parse --short HEAD)" include $(CLEAR_VARS) @@ -21,8 +24,14 @@ CORE_DIR := .. include $(CORE_DIR)/Makefile.common +ifeq ($(DEBUG), 1) + APP_OPTIM := -g -DDEBUG +else + APP_OPTIM := -DNDEBUG +endif + LOCAL_SRC_FILES = $(SOURCES_CXX) -LOCAL_CXXFLAGS = -DANDROID -D__LIBRETRO__ -Wall -Wno-multichar -Wno-unused-variable -Wno-sign-compare -DNDEBUG $(INCFLAGS) +LOCAL_CXXFLAGS = -DANDROID -D__LIBRETRO__ -Wall -Wno-multichar -Wno-unused-variable -Wno-sign-compare $(APP_OPTIM) $(INCFLAGS) -DGIT_VERSION=\"$(GIT_VERSION)\" LOCAL_C_INCLUDES = $(INCFLAGS)