aboutsummaryrefslogtreecommitdiffstats
path: root/emulator/opengl/common.mk
diff options
context:
space:
mode:
Diffstat (limited to 'emulator/opengl/common.mk')
-rw-r--r--emulator/opengl/common.mk26
1 files changed, 22 insertions, 4 deletions
diff --git a/emulator/opengl/common.mk b/emulator/opengl/common.mk
index be5eaf5..255b9e3 100644
--- a/emulator/opengl/common.mk
+++ b/emulator/opengl/common.mk
@@ -24,10 +24,20 @@ emugl-begin-host-static-library = $(call emugl-begin-module,$1,HOST_STATIC_LIBRA
emugl-begin-host-shared-library = $(call emugl-begin-module,$1,HOST_SHARED_LIBRARY,HOST)
emugl-begin-host-executable = $(call emugl-begin-module,$1,HOST_EXECUTABLE,HOST)
+emugl-begin-host64-static-library = $(call emugl-begin-module64,$1,HOST_STATIC_LIBRARY,HOST)
+emugl-begin-host64-shared-library = $(call emugl-begin-module64,$1,HOST_SHARED_LIBRARY,HOST)
+emugl-begin-host64-executable = $(call emugl-begin-module64,$1,HOST_EXECUTABLE,HOST)
+
# Internal list of all declared modules (used for sanity checking)
_emugl_modules :=
_emugl_HOST_modules :=
+ifeq ($(BUILD_STANDALONE_EMULATOR),true)
+EMUGL_LOCAL_EXTRAS = $(end-emulator-module-ev)
+else # BUILD_STANDALONE_EMULATOR != true
+EMUGL_LOCAL_EXTRAS =
+endif # BUILD_STANDALONE_EMULATOR != true
+
# do not use directly, see functions above instead
emugl-begin-module = \
$(eval include $(CLEAR_VARS)) \
@@ -35,14 +45,21 @@ emugl-begin-module = \
$(eval LOCAL_MODULE_TAGS := $(if $3,,debug)) \
$(eval LOCAL_MODULE_CLASS := $(patsubst HOST_%,%,$(patsubst %EXECUTABLE,%EXECUTABLES,$(patsubst %LIBRARY,%LIBRARIES,$2)))) \
$(eval LOCAL_IS_HOST_MODULE := $(if $3,true,))\
- $(eval LOCAL_C_INCLUDES := $(EMUGL_COMMON_INCLUDES)) \
- $(eval LOCAL_CFLAGS := $(EMUGL_COMMON_CFLAGS)) \
+ $(eval LOCAL_C_INCLUDES += $(EMUGL_COMMON_INCLUDES)) \
+ $(eval LOCAL_CFLAGS += $(EMUGL_COMMON_CFLAGS)) \
+ $(eval LOCAL_LDLIBS += -lstdc++) \
$(eval LOCAL_PRELINK_MODULE := false)\
$(eval _EMUGL_INCLUDE_TYPE := $(BUILD_$2)) \
+ $(eval LOCAL_MODULE_BITS := 32) \
$(call _emugl-init-module,$1,$2,$3)
+emugl-begin-module64 = \
+ $(call emugl-begin-module,$1,$2,$3) \
+ $(eval LOCAL_MODULE_BITS := 64) \
+
# Used to end a module definition, see function definitions above
emugl-end-module = \
+ $(eval $(EMUGL_LOCAL_EXTRAS)) \
$(eval include $(_EMUGL_INCLUDE_TYPE))\
$(eval _EMUGL_INCLUDE_TYPE :=) \
$(eval _emugl_$(_emugl_HOST)modules += $(_emugl_MODULE))\
@@ -87,6 +104,7 @@ emugl-end-module = \
# This is the list of recognized export types we support for now.
EMUGL_EXPORT_TYPES := \
CFLAGS \
+ CXXFLAGS \
LDLIBS \
LDFLAGS \
C_INCLUDES \
@@ -118,7 +136,7 @@ _emugl-init-module = \
# $2: Value(s) to append to the export
emugl-export = \
$(eval _emugl.$(_emugl_MODULE).export.$1 += $2)\
- $(eval LOCAL_$1 := $2 $(LOCAL_$1))
+ $(eval LOCAL_$1 := $(LOCAL_$1) $2)
emugl-export-outer = \
$(eval _emugl.$(_emugl_MODULE).export.$1 += $2)
@@ -148,7 +166,7 @@ _emugl-module-import = \
$(call _emugl-module-import,$(_sub))\
)\
$(foreach _type,$(EMUGL_EXPORT_TYPES),\
- $(eval LOCAL_$(_type) := $(_emugl.$1.export.$(_type)) $(LOCAL_$(_type)))\
+ $(eval LOCAL_$(_type) := $(LOCAL_$(_type)) $(_emugl.$1.export.$(_type)))\
)\
$(if $(filter EXECUTABLE SHARED_LIBRARY,$(_emugl.$(_emugl_MODULE).type)),\
$(if $(filter STATIC_LIBRARY,$(_emugl.$1.type)),\