# TODO is there a better way to get this path?
# TODO is net/if.h really missing?
- CFLAGS_EXTRA=-I$(HOME)/nacl_sdk/pepper_44/include/pnacl -DNOSUPPORTIPV6
+ CFLAGS_EXTRA=-I$(HOME)/nacl_sdk/pepper_44/include -I$(HOME)/nacl_sdk/pepper_44/include/pnacl $(SDLCONFIG_CFLAGS) -DNOSUPPORTIPV6
CFLAGS_SSE=
CFLAGS_SSE2=
# TODO use pnacl-finalize and pnacl-compress
- STRIP=:
+ CC=$(HOME)/nacl_sdk/pepper_44/toolchain/linux_pnacl/bin/pnacl-clang++
+ STRIP=$(HOME)/nacl_sdk/pepper_44/toolchain/linux_pnacl/bin/pnacl-finalize --compress
endif
# Mac OS X configuration
# define LINK_TO_LIBVORBIS 1
# define DP_MOBILETOUCH 1
# define DP_FREETYPE_STATIC 1
+#elif defined(__native_client__) /* must come first because it also defines linux */
+# define DP_OS_NAME "NaCl"
+# define DP_OS_STR "nacl"
+# define USE_GLES2 1
#elif TARGET_OS_IPHONE /* must come first because it also defines MACOSX */
# define DP_OS_NAME "iPhoneOS"
# define DP_OS_STR "iphoneos"
{
}
+#ifdef __native_client__
+#include <sys/mount.h>
+static void NaCl_Init(void)
+{
+ mount("", "/dev", "dev", 0, "");
+ mount("", "/.persistentfs", "html5fs", 0, "type=PERSISTENT,expected_size=8388608");
+ mount("", "/.tempfs", "html5fs", 0, "type=TEMPORARY,expected_size=1073741824");
+ int fd = open("/dev/console0", O_WRONLY, 0644);
+ outfd = fd;
+}
+#endif
+
int main (int argc, char *argv[])
{
signal(SIGFPE, SIG_IGN);
// we don't know which systems we'll want to init, yet...
SDL_Init(0);
+#ifdef __native_client__
+ NaCl_Init();
+#endif
+
Host_Main();
return 0;