From 253c6542c3d261eb938b8c078d29564aa77d0ce9 Mon Sep 17 00:00:00 2001 From: GiWoong Kim Date: Tue, 10 Sep 2013 10:54:32 +0900 Subject: [PATCH] qemu: gathering ecs modules into a ecs folder Change-Id: I051b3af3646c9b46ab178cd9ae50038ef8a3d908 Signed-off-by: Jinhyung Choi --- tizen/src/Makefile.tizen | 17 +++-------------- tizen/src/ecs/Makefile.tizen | 11 +++++++++++ tizen/src/{ => ecs}/base64.c | 7 ++++--- tizen/src/{ => ecs}/base64.h | 0 tizen/src/{ => ecs}/ecs-json-streamer.c | 0 tizen/src/{ => ecs}/ecs-json-streamer.h | 0 tizen/src/{ => ecs}/ecs.c | 0 tizen/src/{ => ecs}/ecs.h | 0 tizen/src/{ => ecs}/ecs_msg.c | 0 tizen/src/{ => ecs}/ecs_sensor.c | 0 tizen/src/{ => ecs}/genmsg/ecs.pb-c.c | 0 tizen/src/{ => ecs}/genmsg/ecs.pb-c.h | 2 +- tizen/src/{ => ecs}/msg/ecs.proto | 0 tizen/src/{ => ecs}/msg/gen.sh | 0 tizen/src/emulator.c | 2 +- tizen/src/hw/maru_virtio_evdi.c | 2 +- tizen/src/hw/maru_virtio_nfc.c | 2 +- tizen/src/hw/maru_virtio_sensor.c | 2 +- tizen/src/skin/maruskin_server.c | 2 +- 19 files changed, 24 insertions(+), 23 deletions(-) create mode 100644 tizen/src/ecs/Makefile.tizen rename tizen/src/{ => ecs}/base64.c (96%) rename tizen/src/{ => ecs}/base64.h (100%) rename tizen/src/{ => ecs}/ecs-json-streamer.c (100%) rename tizen/src/{ => ecs}/ecs-json-streamer.h (100%) rename tizen/src/{ => ecs}/ecs.c (100%) rename tizen/src/{ => ecs}/ecs.h (100%) rename tizen/src/{ => ecs}/ecs_msg.c (100%) rename tizen/src/{ => ecs}/ecs_sensor.c (100%) rename tizen/src/{ => ecs}/genmsg/ecs.pb-c.c (100%) rename tizen/src/{ => ecs}/genmsg/ecs.pb-c.h (99%) rename tizen/src/{ => ecs}/msg/ecs.proto (100%) rename tizen/src/{ => ecs}/msg/gen.sh (100%) diff --git a/tizen/src/Makefile.tizen b/tizen/src/Makefile.tizen index e326a64fb1..ffaeb53288 100644 --- a/tizen/src/Makefile.tizen +++ b/tizen/src/Makefile.tizen @@ -1,12 +1,9 @@ # Makefile.tizen # for TIZEN-maru board - -$(call set-vpath, $(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/tizen/src/genmsg:$(SRC_PATH)/tizen/distrib/protobuf:$(SRC_PATH)/hw:$(SRC_PATH)/tizen/src:$(SRC_PATH)/tizen/src/hw:$(SRC_PATH)/tizen/src/skin:$(SRC_PATH)/tizen/src/SDL_gfx) +$(call set-vpath, $(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw:$(SRC_PATH)/tizen/src:$(SRC_PATH)/tizen/src/hw:$(SRC_PATH)/tizen/src/skin:$(SRC_PATH)/tizen/src/SDL_gfx) QEMU_CFLAGS += -I$(SRC_PATH)/hw -I$(SRC_PATH)/tizen/src -QEMU_CFLAGS += -I$(SRC_PATH)/tizen/src/genmsg -QEMU_CFLAGS += -I$(SRC_PATH)/tizen/distrib/protobuf QEMU_CFLAGS += -I$(SRC_PATH)/tizen/distrib/libav/$(ARCH)/include LDFLAGS += -L$(SRC_PATH)/tizen/distrib/libav/$(ARCH)/lib QEMU_CFLAGS += $(SDL_CFLAGS) @@ -108,12 +105,8 @@ endif # debug channel obj-y += debug_ch.o -# ecs -obj-y += ecs_msg.o ecs.o ecs-json-streamer.o qmp_handler.o ecs_sensor.o - -# ecs msg -obj-y += ecs.pb-c.o protobuf-c.o - +# ECS +include $(SRC_PATH)/tizen/src/ecs/Makefile.tizen # maru hardware include $(SRC_PATH)/tizen/src/Makefile.tizen.$(TARGET_BASE_ARCH) @@ -150,10 +143,6 @@ obj-y += maruskin_client.o maruskin_server.o maruskin_operation.o maruskin_keyma # guest server obj-y += guest_server.o -# base64 -obj-y += base64.o - - #ifndef CONFIG_DARWIN ########################################################### ## opengl library for i386 diff --git a/tizen/src/ecs/Makefile.tizen b/tizen/src/ecs/Makefile.tizen new file mode 100644 index 0000000000..4f1bf40c14 --- /dev/null +++ b/tizen/src/ecs/Makefile.tizen @@ -0,0 +1,11 @@ +# ECS Makefile.tizen + +$(call set-vpath, $(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/tizen/src/ecs:$(SRC_PATH)/tizen/src/ecs/genmsg:$(SRC_PATH)/tizen/distrib/protobuf) + +QEMU_CFLAGS += -I$(SRC_PATH)/tizen/distrib/protobuf +QEMU_CFLAGS += -I$(SRC_PATH)/tizen/src/ecs/genmsg + +obj-y += ecs.pb-c.o protobuf-c.o +obj-y += base64.o +obj-y += ecs_msg.o ecs.o ecs-json-streamer.o qmp_handler.o ecs_sensor.o + diff --git a/tizen/src/base64.c b/tizen/src/ecs/base64.c similarity index 96% rename from tizen/src/base64.c rename to tizen/src/ecs/base64.c index 3b723051a1..299487fb5f 100644 --- a/tizen/src/base64.c +++ b/tizen/src/ecs/base64.c @@ -81,14 +81,15 @@ int base64_encode(const char *text, int numBytes, char **encodedText) unsigned char input[3] = {0,0,0}; unsigned char output[4] = {0,0,0,0}; int index, i, j, size; - char *p, *plen; + char *p, *plen, *ptext; - plen = text + numBytes - 1; + ptext = (char*)text; + plen = ptext + numBytes - 1; size = (4 * (numBytes / 3)) + (numBytes % 3? 4 : 0) + 1; (*encodedText) = malloc(size); j = 0; - for (i = 0, p = text;p <= plen; i++, p++) { + for (i = 0, p = ptext;p <= plen; i++, p++) { index = i % 3; input[index] = *p; diff --git a/tizen/src/base64.h b/tizen/src/ecs/base64.h similarity index 100% rename from tizen/src/base64.h rename to tizen/src/ecs/base64.h diff --git a/tizen/src/ecs-json-streamer.c b/tizen/src/ecs/ecs-json-streamer.c similarity index 100% rename from tizen/src/ecs-json-streamer.c rename to tizen/src/ecs/ecs-json-streamer.c diff --git a/tizen/src/ecs-json-streamer.h b/tizen/src/ecs/ecs-json-streamer.h similarity index 100% rename from tizen/src/ecs-json-streamer.h rename to tizen/src/ecs/ecs-json-streamer.h diff --git a/tizen/src/ecs.c b/tizen/src/ecs/ecs.c similarity index 100% rename from tizen/src/ecs.c rename to tizen/src/ecs/ecs.c diff --git a/tizen/src/ecs.h b/tizen/src/ecs/ecs.h similarity index 100% rename from tizen/src/ecs.h rename to tizen/src/ecs/ecs.h diff --git a/tizen/src/ecs_msg.c b/tizen/src/ecs/ecs_msg.c similarity index 100% rename from tizen/src/ecs_msg.c rename to tizen/src/ecs/ecs_msg.c diff --git a/tizen/src/ecs_sensor.c b/tizen/src/ecs/ecs_sensor.c similarity index 100% rename from tizen/src/ecs_sensor.c rename to tizen/src/ecs/ecs_sensor.c diff --git a/tizen/src/genmsg/ecs.pb-c.c b/tizen/src/ecs/genmsg/ecs.pb-c.c similarity index 100% rename from tizen/src/genmsg/ecs.pb-c.c rename to tizen/src/ecs/genmsg/ecs.pb-c.c diff --git a/tizen/src/genmsg/ecs.pb-c.h b/tizen/src/ecs/genmsg/ecs.pb-c.h similarity index 99% rename from tizen/src/genmsg/ecs.pb-c.h rename to tizen/src/ecs/genmsg/ecs.pb-c.h index 66592662fe..09ef146bce 100644 --- a/tizen/src/genmsg/ecs.pb-c.h +++ b/tizen/src/ecs/genmsg/ecs.pb-c.h @@ -3,7 +3,7 @@ #ifndef PROTOBUF_C_ecs_2eproto__INCLUDED #define PROTOBUF_C_ecs_2eproto__INCLUDED -#include "../../distrib/protobuf/protobuf-c.h" +#include "../../../distrib/protobuf/protobuf-c.h" PROTOBUF_C_BEGIN_DECLS diff --git a/tizen/src/msg/ecs.proto b/tizen/src/ecs/msg/ecs.proto similarity index 100% rename from tizen/src/msg/ecs.proto rename to tizen/src/ecs/msg/ecs.proto diff --git a/tizen/src/msg/gen.sh b/tizen/src/ecs/msg/gen.sh similarity index 100% rename from tizen/src/msg/gen.sh rename to tizen/src/ecs/msg/gen.sh diff --git a/tizen/src/emulator.c b/tizen/src/emulator.c index 6c1849a041..ca3020eacf 100644 --- a/tizen/src/emulator.c +++ b/tizen/src/emulator.c @@ -52,7 +52,7 @@ #include "skin/maruskin_server.h" #include "skin/maruskin_client.h" #include "debug_ch.h" -#include "ecs.h" +#include "ecs/ecs.h" #ifdef CONFIG_SDL #include diff --git a/tizen/src/hw/maru_virtio_evdi.c b/tizen/src/hw/maru_virtio_evdi.c index 8b919b507d..596d9f9935 100644 --- a/tizen/src/hw/maru_virtio_evdi.c +++ b/tizen/src/hw/maru_virtio_evdi.c @@ -31,7 +31,7 @@ #include "maru_device_ids.h" #include "maru_virtio_evdi.h" #include "debug_ch.h" -#include "../ecs.h" +#include "../ecs/ecs.h" MULTI_DEBUG_CHANNEL(qemu, virtio-evdi); diff --git a/tizen/src/hw/maru_virtio_nfc.c b/tizen/src/hw/maru_virtio_nfc.c index 51f7d596c1..7a38d8c3de 100755 --- a/tizen/src/hw/maru_virtio_nfc.c +++ b/tizen/src/hw/maru_virtio_nfc.c @@ -31,7 +31,7 @@ #include "maru_device_ids.h" #include "maru_virtio_nfc.h" #include "debug_ch.h" -#include "../ecs.h" +#include "../ecs/ecs.h" MULTI_DEBUG_CHANNEL(qemu, virtio-nfc); diff --git a/tizen/src/hw/maru_virtio_sensor.c b/tizen/src/hw/maru_virtio_sensor.c index 98470d32a0..a651a63e6d 100644 --- a/tizen/src/hw/maru_virtio_sensor.c +++ b/tizen/src/hw/maru_virtio_sensor.c @@ -34,7 +34,7 @@ #include "maru_device_ids.h" #include "maru_virtio_sensor.h" #include "debug_ch.h" -#include "../ecs.h" +#include "../ecs/ecs.h" MULTI_DEBUG_CHANNEL(qemu, virtio-sensor); diff --git a/tizen/src/skin/maruskin_server.c b/tizen/src/skin/maruskin_server.c index 96e0787839..74d4a49fcd 100644 --- a/tizen/src/skin/maruskin_server.c +++ b/tizen/src/skin/maruskin_server.c @@ -44,7 +44,7 @@ #include "maruskin_client.h" #include "emulator.h" #include "maru_err_table.h" -#include "ecs.h" +#include "ecs/ecs.h" #ifndef CONFIG_USE_SHM #include "maru_sdl.h" -- 2.34.1