mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 03:30:46 +00:00
Some stuff for using clang to build on Android. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5717 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
93a86e2840
commit
3cba791f5b
4 changed files with 21 additions and 4 deletions
|
@ -7,6 +7,7 @@ LOCAL_MODULE := duke3d
|
||||||
COMMONFLAGS := -x c++ -std=gnu++11 -fvisibility=hidden -fPIC -funsigned-char -fno-strict-aliasing -pthread \
|
COMMONFLAGS := -x c++ -std=gnu++11 -fvisibility=hidden -fPIC -funsigned-char -fno-strict-aliasing -pthread \
|
||||||
-W -Wall -Wextra -Wpointer-arith -Wno-char-subscripts -Wno-missing-braces -Wwrite-strings -Wuninitialized \
|
-W -Wall -Wextra -Wpointer-arith -Wno-char-subscripts -Wno-missing-braces -Wwrite-strings -Wuninitialized \
|
||||||
-Wno-attributes -Wno-strict-overflow -Wno-unused-result -Wlogical-op -Wcast-qual \
|
-Wno-attributes -Wno-strict-overflow -Wno-unused-result -Wlogical-op -Wcast-qual \
|
||||||
|
-Wno-unknown-warning-option -Wno-deprecated-register -Werror=return-type \
|
||||||
-DHAVE_SDL -DHAVE_VORBIS -DHAVE_JWZGLES -DHAVE_ANDROID -DRENDERTYPESDL=1 -DUSE_OPENGL -DNETCODE_DISABLE -DUSE_LIBVPX \
|
-DHAVE_SDL -DHAVE_VORBIS -DHAVE_JWZGLES -DHAVE_ANDROID -DRENDERTYPESDL=1 -DUSE_OPENGL -DNETCODE_DISABLE -DUSE_LIBVPX \
|
||||||
-DHAVE_INTTYPES -D_GNU_SOURCE=1 -D_REENTRANT
|
-DHAVE_INTTYPES -D_GNU_SOURCE=1 -D_REENTRANT
|
||||||
|
|
||||||
|
@ -16,8 +17,11 @@ LOCAL_ARM_NEON = true
|
||||||
ifeq ($(NDK_DEBUG), 1)
|
ifeq ($(NDK_DEBUG), 1)
|
||||||
COMMONFLAGS += -O0 -ggdb -fno-omit-frame-pointer -fno-stack-protector -D_FORTIFY_SOURCE=0 -DDEBUGGINGAIDS=0
|
COMMONFLAGS += -O0 -ggdb -fno-omit-frame-pointer -fno-stack-protector -D_FORTIFY_SOURCE=0 -DDEBUGGINGAIDS=0
|
||||||
else
|
else
|
||||||
COMMONFLAGS += -O2 -DNDEBUG -DUSING_LTO -flto -D_FORTIFY_SOURCE=2
|
COMMONFLAGS += -O2 -DNDEBUG -D_FORTIFY_SOURCE=2
|
||||||
|
ifeq ($(findstring clang,$(NDK_TOOLCHAIN_VERSION)),)
|
||||||
|
COMMONFLAGS += -DUSING_LTO -flto
|
||||||
LOCAL_LDFLAGS += -flto
|
LOCAL_LDFLAGS += -flto
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LOCAL_CFLAGS = $(COMMONFLAGS)
|
LOCAL_CFLAGS = $(COMMONFLAGS)
|
||||||
|
|
|
@ -387,11 +387,17 @@ void eduke32_exit_return(int retval)
|
||||||
{
|
{
|
||||||
eduke32_return_value = retval;
|
eduke32_return_value = retval;
|
||||||
longjmp(eduke32_exit_jmp_buf, 1);
|
longjmp(eduke32_exit_jmp_buf, 1);
|
||||||
|
EDUKE32_UNREACHABLE_SECTION(return);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
int32_t WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int32_t nCmdShow)
|
int32_t WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int32_t nCmdShow)
|
||||||
|
#elif defined __ANDROID__
|
||||||
|
# ifdef __cplusplus
|
||||||
|
extern "C" int eduke32_android_main(int argc, char const *argv[]);
|
||||||
|
# endif
|
||||||
|
int eduke32_android_main(int argc, char const *argv[])
|
||||||
#else
|
#else
|
||||||
int32_t main(int32_t argc, char *argv[])
|
int32_t main(int32_t argc, char *argv[])
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,7 +1,14 @@
|
||||||
#ifndef DARKRL__MATH_HPP__
|
#ifndef DARKRL__MATH_HPP__
|
||||||
#define DARKRL__MATH_HPP__
|
#define DARKRL__MATH_HPP__
|
||||||
|
|
||||||
|
#if defined __GNUC__
|
||||||
|
# pragma GCC diagnostic push
|
||||||
|
# pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||||
|
#endif
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#if defined __GNUC__
|
||||||
|
# pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "Types.hpp"
|
#include "Types.hpp"
|
||||||
|
|
||||||
|
|
|
@ -1674,7 +1674,7 @@ static void C_GetNextVarType(int32_t type)
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if ((*textptr == '-')/* && !isdigit(*(textptr+1))*/)
|
else if (*textptr == '-'/* && !isdigit(*(textptr+1))*/)
|
||||||
{
|
{
|
||||||
if (EDUKE32_PREDICT_FALSE(type))
|
if (EDUKE32_PREDICT_FALSE(type))
|
||||||
{
|
{
|
||||||
|
@ -1701,7 +1701,7 @@ static void C_GetNextVarType(int32_t type)
|
||||||
}
|
}
|
||||||
|
|
||||||
C_SkipComments(); //skip comments and whitespace
|
C_SkipComments(); //skip comments and whitespace
|
||||||
if ((*textptr == '[')) //read of array as a gamevar
|
if (*textptr == '[') //read of array as a gamevar
|
||||||
{
|
{
|
||||||
int32_t lLabelID = -1;
|
int32_t lLabelID = -1;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue