Skip to content

Commit

Permalink
add script to update deps; update deps; refactor makefiles; allow bui…
Browse files Browse the repository at this point in the history
…lding og gtest and libpng
  • Loading branch information
fundies committed May 29, 2021
1 parent 5dc4852 commit 42253c2
Show file tree
Hide file tree
Showing 3,821 changed files with 770,709 additions and 282,450 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
20 changes: 10 additions & 10 deletions enigma/Android.mk
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
ENIGMA_ROOT := $(call my-dir)/../../
ENIGMA_ROOT := $(shell realpath $$PWD/../../)
ENIGMA_SHELL := $(ENIGMA_ROOT)/ENIGMAsystem/SHELL
EXTERNAL := $(ENIGMA_ROOT)/android/external
WORKDIR := /tmp/ENIGMA

include $(EXTERNAL)/SDL2/Android.mk
include $(WORKDIR)/build.makefiles

include $(CLEAR_VARS)

LOCAL_MODULE := enigma

LOCAL_C_INCLUDES := $(ENIGMA_SHELL) $(ENIGMA_SHELL)/Graphics_Systems/OpenGLES/wrappers $(EXTERNAL)/hacks $(EXTERNAL)/libepoxy/include/
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
IGNORE_WARNINGS := -Wno-unused-parameter -Wno-ignored-qualifiers -Wno-dollar-in-identifier-extension

LOCAL_C_INCLUDES += $(ENIGMA_ROOT)/shared $(ENIGMA_SHELL)/Bridges/OpenGLES/ $(EXTERNAL)/SDL2/include/ $(EXTERNAL)/glad/gles2/include $(EXTERNAL)/glm $(ENIGMA_SHELL)/Platforms/SDL/fileio /tmp/ENIGMA
LOCAL_CFLAGS := -DDEBUG_MODE -DENIGMA_PLATFORM_SDL
LOCAL_CPPFLAGS := -stdlib=libc++ -std=c++17
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
LOCAL_CFLAGS := $(shell cat $(WORKDIR)/build.cflags) $(IGNORE_WARNINGS)
LOCAL_CPPFLAGS := -stdlib=libc++ -I$(EXTERNAL)/hacks $(shell cat $(WORKDIR)/build.cxxflags | sed "s#-I\\([^/]\\)#-I$(ENIGMA_SHELL)/\\1#g") $(IGNORE_WARNINGS)

LOCAL_SRC_FILES := $(addprefix $(ENIGMA_SHELL)/, $(shell cat $(WORKDIR)/sources.list))
LOCAL_SRC_FILES := $(shell for i in $(shell cat $(WORKDIR)/sources.list); do echo $$i | sed "s#\\(^[^/]\\)#$(ENIGMA_SHELL)/\\1#g"; done | xargs echo)

LOCAL_SHARED_LIBRARIES := SDL2
LOCAL_LDLIBS := -lGLESv2 -llog -lz
LOCAL_SHARED_LIBRARIES := $(shell cat $(WORKDIR)/build.libs)
LOCAL_LDLIBS := $(shell cat $(WORKDIR)/build.ldlibs) -llog -lz
include $(BUILD_SHARED_LIBRARY)
Binary file modified enigma/src/main/assets/resources.res
Binary file not shown.
19 changes: 19 additions & 0 deletions external/GTest.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
LOCAL_PATH := $(call my-dir)/gtest/googletest

###########################
#
# GTEST shared library
#
###########################

include $(CLEAR_VARS)

LOCAL_MODULE := gtest

LOCAL_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/include

LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)

LOCAL_SRC_FILES := $(LOCAL_PATH)/src/gtest-all.cc

include $(BUILD_SHARED_LIBRARY)
33 changes: 32 additions & 1 deletion external/SDL2/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ LOCAL_SRC_FILES := \
$(wildcard $(LOCAL_PATH)/src/audio/*.c) \
$(wildcard $(LOCAL_PATH)/src/audio/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/audio/dummy/*.c) \
$(wildcard $(LOCAL_PATH)/src/audio/openslES/*.c) \
$(LOCAL_PATH)/src/atomic/SDL_atomic.c.arm \
$(LOCAL_PATH)/src/atomic/SDL_spinlock.c.arm \
$(wildcard $(LOCAL_PATH)/src/core/android/*.c) \
Expand All @@ -32,7 +33,12 @@ LOCAL_SRC_FILES := \
$(wildcard $(LOCAL_PATH)/src/joystick/*.c) \
$(wildcard $(LOCAL_PATH)/src/joystick/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/joystick/hidapi/*.c) \
$(wildcard $(LOCAL_PATH)/src/joystick/virtual/*.c) \
$(wildcard $(LOCAL_PATH)/src/loadso/dlopen/*.c) \
$(wildcard $(LOCAL_PATH)/src/locale/*.c) \
$(wildcard $(LOCAL_PATH)/src/locale/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/misc/*.c) \
$(wildcard $(LOCAL_PATH)/src/misc/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/power/*.c) \
$(wildcard $(LOCAL_PATH)/src/power/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/filesystem/android/*.c) \
Expand All @@ -53,12 +59,34 @@ LOCAL_SRC_FILES := \
LOCAL_SHARED_LIBRARIES := hidapi

LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES
LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -llog -landroid
LOCAL_CFLAGS += \
-Wall -Wextra \
-Wdocumentation \
-Wdocumentation-unknown-command \
-Wmissing-prototypes \
-Wunreachable-code-break \
-Wunneeded-internal-declaration \
-Wmissing-variable-declarations \
-Wfloat-conversion \
-Wshorten-64-to-32 \
-Wunreachable-code-return \
-Wshift-sign-overflow \
-Wstrict-prototypes \
-Wkeyword-macro \


# Warnings we haven't fixed (yet)
LOCAL_CFLAGS += -Wno-unused-parameter -Wno-sign-compare


LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -lOpenSLES -llog -landroid

ifeq ($(NDK_DEBUG),1)
cmd-strip :=
endif

LOCAL_STATIC_LIBRARIES := cpufeatures

include $(BUILD_SHARED_LIBRARY)

###########################
Expand Down Expand Up @@ -108,3 +136,6 @@ LOCAL_MODULE := libhidapi
LOCAL_LDLIBS := -llog

include $(BUILD_SHARED_LIBRARY)

$(call import-module,android/cpufeatures)

Loading

0 comments on commit 42253c2

Please sign in to comment.