From: syeon.hwang Date: Wed, 14 Mar 2012 12:14:48 +0000 (+0900) Subject: Fix for windows build X-Git-Tag: TizenStudio_2.0_p2.3~1735 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7f8085c391f67e94a334e92cb5548d431a46c9ea;p=sdk%2Femulator%2Fqemu.git Fix for windows build --- diff --git a/tizen/src/Makefile.tizen b/tizen/src/Makefile.tizen index c7f37ea..857fdcf 100644 --- a/tizen/src/Makefile.tizen +++ b/tizen/src/Makefile.tizen @@ -9,7 +9,11 @@ QEMU_CFLAGS += -I$(SRC_PATH)/tizen/distrib/ffmpeg/include QEMU_CFLAGS += -L$(SRC_PATH)/tizen/distrib/ffmpeg/lib QEMU_CFLAGS += $(SDL_CFLAGS) +ifdef CONFIG_WIN32 +LIBS += -lavformat -lavcodec -lavutil -lm +else LIBS += -lavformat -lavcodec -lavutil -lm -lGL +endif # maru loader obj-y += emulator.o process.o maru_signal.o maru_sdl.o @@ -38,11 +42,15 @@ endif # maru skin -obj-i386-y += maruskin_client.o maruskin_server.o maruskin_operation.o maruskin_keymap.o +obj-i386-y += maruskin_client.o maruskin_server.o maruskin_operation.o +ifdef CONFIG_WIN32 +obj-i386-y += maruskin_keymap.o +endif # guest server obj-i386-y += guest_server.o +ifndef CONFIG_WIN32 ########################################################## # opengl library for i386 obj-i386-y += helper_opengl.o opengl_exec.o opengl_server.o @@ -74,4 +82,5 @@ endif #gles2.o: gles2.c gles2.h gles2_calls.h ########################################################## +endif diff --git a/tizen/src/guest_server.c b/tizen/src/guest_server.c index 36069d1..a7d8763 100644 --- a/tizen/src/guest_server.c +++ b/tizen/src/guest_server.c @@ -31,7 +31,15 @@ #include #include #include + +#ifdef _WIN32 +#include +#include +#include +#else #include +#endif + #include "guest_server.h" #include "skin/maruskin_server.h" #include "debug_ch.h" @@ -51,7 +59,7 @@ pthread_t start_guest_server( int server_port ) { svr_port = server_port; - pthread_t thread_id = -1; + pthread_t thread_id; if ( 0 != pthread_create( &thread_id, NULL, run_guest_server, NULL ) ) { ERR( "fail to create guest_server pthread.\n" ); diff --git a/tizen/src/maru_sdl.h b/tizen/src/maru_sdl.h index 33a3dd7..9ab855f 100644 --- a/tizen/src/maru_sdl.h +++ b/tizen/src/maru_sdl.h @@ -34,13 +34,11 @@ #include "console.h" #ifndef _WIN32 #include -#include #include #else #include #include #include -#include #include #include #endif diff --git a/tizen/src/skin/maruskin_operation.c b/tizen/src/skin/maruskin_operation.c index 661d422..185707d 100644 --- a/tizen/src/skin/maruskin_operation.c +++ b/tizen/src/skin/maruskin_operation.c @@ -33,11 +33,15 @@ #include "maru_sdl.h" #include "debug_ch.h" #include "../hw/maru_pm.h" -#include "maruskin_keymap.h" + #include "console.h" #include "sdb.h" #include "nbd.h" +#ifndef _WIN32 +#include "maruskin_keymap.h" +#endif + MULTI_DEBUG_CHANNEL(qemu, skin_operation); enum { @@ -169,7 +173,7 @@ void do_rotation_event( int event_type) { INFO( "send to sendord(size: %d) 127.0.0.1:%d/tcp \n", buf_size, get_sdb_base_port() + SDB_TCP_EMULD_INDEX); #ifdef _WIN32 - closiesocket( s ); + closesocket( s ); #else close( s ); #endif diff --git a/tizen/src/skin/maruskin_server.c b/tizen/src/skin/maruskin_server.c index 5cb2508..a273500 100644 --- a/tizen/src/skin/maruskin_server.c +++ b/tizen/src/skin/maruskin_server.c @@ -31,10 +31,16 @@ #include #include #include +#ifdef _WIN32 +#include +#include +#include +#else #include -#include #include #include +#endif +#include #include #include #include "maruskin_server.h"