ifeq ($(TARGET_PLATFORM),apple)
OSX_TARGET := defined
else
+ifeq ($(TARGET_PLATFORM),emscripten)
+ EMSCRIPTEN_TARGET := defined
+else
+ifeq ($(TARGET_PLATFORM),pnacl)
+ PNACL_TARGET := defined
+else
#ifeq ($(TARGET_PLATFORM),bsd)
# BSD_TARGET := defined
#else
#endif
endif
endif
+endif
+endif
# CROSS_TARGET
ifneq ($(TARGET_PLATFORM),$(HOST_PLATFORM))
extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
-typedef enum { unknown, win32, tux, apple } Platform;
+typedef enum { unknown, win32, tux, apple, emscripten, pnacl } Platform;
#if defined(__WIN32__) && !defined(__EMSCRIPTEN__)
Platform runtimePlatform = win32;
#elif defined(__APPLE__)
Platform runtimePlatform = apple;
-#else //if defined(__linux__)
+#elif defined(__EMSCRIPTEN__) // (EMSCRIPTEN)
+Platform runtimePlatform = emscripten;
+#else //elif defined(__linux__)
Platform runtimePlatform = tux;
/*#else
Platform runtimePlatform = unknown; // 'linux' is used as a catch all UNIX platform for now
}
}
-static const char * platformNames[Platform] = { "", "win32", "linux", "apple" }; // how to have this be accessible outside of dll/lib
+static const char * platformNames[Platform] = { "", "win32", "linux", "apple", "emscripten", "pnacl" }; // how to have this be accessible outside of dll/lib
static const Platform firstPlatform = win32;
-static const Platform lastPlatform = apple;
+static const Platform lastPlatform = pnacl;
public enum Platform
{
- unknown, win32, tux, apple;
+ unknown, win32, tux, apple, emscripten, pnacl;
property const char *
{
const char * PlatformToMakefileTargetVariable(Platform platform)
{
- return platform == win32 ? "WINDOWS_TARGET" :
- platform == tux ? "LINUX_TARGET" :
- platform == apple ? "OSX_TARGET" :
- "ERROR_BAD_TARGET";
+ return platform == win32 ? "WINDOWS_TARGET" :
+ platform == tux ? "LINUX_TARGET" :
+ platform == apple ? "OSX_TARGET" :
+ platform == emscripten ? "EMSCRIPTEN_TARGET" :
+ platform == pnacl ? "PNACL_TARGET" :
+ "ERROR_BAD_TARGET";
}
const char * TargetTypeToMakefileVariable(TargetTypes targetType)