Get rid of libqemu library.

Its implementation has been inlined in hardware/libhardware/include/hardware/qemu_pipe.h

Change-Id: I355764f87047c915ac43b85cd18bf0f27f06ede3
diff --git a/tools/emulator/opengl/system/GLESv1/Android.mk b/tools/emulator/opengl/system/GLESv1/Android.mk
index 9119c07..9d45694 100644
--- a/tools/emulator/opengl/system/GLESv1/Android.mk
+++ b/tools/emulator/opengl/system/GLESv1/Android.mk
@@ -7,7 +7,6 @@
 LOCAL_CFLAGS += -DLOG_TAG=\"GLES_emulation\" -DGL_GLEXT_PROTOTYPES
 
 LOCAL_SRC_FILES := gl.cpp
-LOCAL_STATIC_LIBRARIES += libqemu
 LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/egl
 
 $(call emugl-end-module)
@@ -44,7 +43,6 @@
 #
 # LOCAL_STATIC_LIBRARIES := \
 #     libOpenglCodecCommon  \
-# 	libqemu
 #
 # LOCAL_SHARED_LIBRARIES := \
 #     libcutils \
diff --git a/tools/emulator/opengl/system/GLESv2/Android.mk b/tools/emulator/opengl/system/GLESv2/Android.mk
index 184476a..c299522 100644
--- a/tools/emulator/opengl/system/GLESv2/Android.mk
+++ b/tools/emulator/opengl/system/GLESv2/Android.mk
@@ -7,7 +7,6 @@
 LOCAL_CFLAGS += -DLOG_TAG=\"GLESv2_emulation\" -DGL_GLEXT_PROTOTYPES
 
 LOCAL_SRC_FILES := gl2.cpp
-LOCAL_STATIC_LIBRARIES += libqemu
 LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/egl
 
 $(call emugl-end-module)
diff --git a/tools/emulator/opengl/system/OpenglSystemCommon/Android.mk b/tools/emulator/opengl/system/OpenglSystemCommon/Android.mk
index b397bda..a04d19c 100644
--- a/tools/emulator/opengl/system/OpenglSystemCommon/Android.mk
+++ b/tools/emulator/opengl/system/OpenglSystemCommon/Android.mk
@@ -10,6 +10,4 @@
 
 $(call emugl-export,C_INCLUDES,$(LOCAL_PATH))
 
-LOCAL_STATIC_LIBRARIES += libqemu
-
 $(call emugl-end-module)
diff --git a/tools/emulator/opengl/system/egl/Android.mk b/tools/emulator/opengl/system/egl/Android.mk
index fd5ba18..312b49d 100644
--- a/tools/emulator/opengl/system/egl/Android.mk
+++ b/tools/emulator/opengl/system/egl/Android.mk
@@ -37,8 +37,7 @@
 LOCAL_PRELINK_MODULE := false
 
 LOCAL_STATIC_LIBRARIES := \
-    libOpenglCodecCommon  \
-	libqemu
+    libOpenglCodecCommon
 
 LOCAL_SHARED_LIBRARIES := \
     libcutils \
diff --git a/tools/emulator/opengl/system/gralloc/Android.mk b/tools/emulator/opengl/system/gralloc/Android.mk
index 9340185..52ee26c 100644
--- a/tools/emulator/opengl/system/gralloc/Android.mk
+++ b/tools/emulator/opengl/system/gralloc/Android.mk
@@ -31,8 +31,7 @@
 LOCAL_MODULE := gralloc.goldfish
 
 LOCAL_STATIC_LIBRARIES := \
-    libOpenglCodecCommon \
-    libqemu
+    libOpenglCodecCommon
 
 LOCAL_SHARED_LIBRARIES := \
     libcutils \
diff --git a/tools/emulator/opengl/tests/gles_android_wrapper/Android.mk b/tools/emulator/opengl/tests/gles_android_wrapper/Android.mk
index ad38c4d..8aee204 100644
--- a/tools/emulator/opengl/tests/gles_android_wrapper/Android.mk
+++ b/tools/emulator/opengl/tests/gles_android_wrapper/Android.mk
@@ -164,8 +164,7 @@
 	libOpenglSystemCommon \
 	libut_rendercontrol_enc
 
-LOCAL_STATIC_LIBRARIES := libOpenglCodecCommon \
-						  libqemu
+LOCAL_STATIC_LIBRARIES := libOpenglCodecCommon
 
 include $(BUILD_SHARED_LIBRARY)
 
diff --git a/tools/emulator/system/libqemu/Android.mk b/tools/emulator/system/libqemu/Android.mk
deleted file mode 100644
index a0f0e54..0000000
--- a/tools/emulator/system/libqemu/Android.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-# The main libqemud library
-include $(CLEAR_VARS)
-LOCAL_MODULE    := libqemu
-LOCAL_SRC_FILES := libqemu.c
-LOCAL_MODULE_TAGS := debug
-include $(BUILD_STATIC_LIBRARY)
-
-# Define BUILD_LIBQEMUD_TESTS to 'true' in your environment
-# to generate the following test programs. You must be on Linux!
-#
-ifeq (true-linux,$(strip $(BUILD_LIBQEMU_TESTS)-$(HOST_OS)))
-include $(LOCAL_PATH)/tests.mk
-endif # BUILD_LIBQEMUD_TESTS == true
diff --git a/tools/emulator/system/libqemu/libqemu.c b/tools/emulator/system/libqemu/libqemu.c
deleted file mode 100644
index be2ca76..0000000
--- a/tools/emulator/system/libqemu/libqemu.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* Set to 1 to enable debugging */
-#define DEBUG  0
-
-#if DEBUG >= 1
-#  define D(...)  fprintf(stderr,"libqemud:" __VA_ARGS__), fprintf(stderr, "\n")
-#endif
-
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-#include <hardware/qemud.h>
-#include <hardware/qemu_pipe.h>
-#include <pthread.h>  /* for pthread_once() */
-#include <stdlib.h>
-#include <stdio.h>
-
-/* Used for debugging */
-
-#ifndef D
-#  define  D(...)   do{}while(0)
-#endif
-
-/* Try to open a qemud pipe, 'pipeName' must be a generic pipe service
- * name (e.g. "opengles" or "camera"). The emulator will be in charge of
- * connecting the corresponding pipe/client to an internal service or an
- * external socket, these details are hidden from the caller.
- *
- * Return a new QemuPipe pointer, or NULL in case of error
- */
-int
-qemu_pipe_open(const char*  pipeName)
-{
-    char  buff[256];
-    int   buffLen;
-    int   fd, ret;
-
-    if (pipeName == NULL || pipeName[0] == '\0') {
-        errno = EINVAL;
-        return -1;
-    }
-
-    snprintf(buff, sizeof buff, "pipe:%s", pipeName);
-
-    fd = open("/dev/qemu_pipe", O_RDWR);
-    if (fd < 0) {
-        D("%s: Could not open /dev/qemu_pipe: %s", __FUNCTION__, strerror(errno));
-        errno = ENOSYS;
-        return -1;
-    }
-
-    buffLen = strlen(buff);
-
-    ret = TEMP_FAILURE_RETRY(write(fd, buff, buffLen+1));
-    if (ret != buffLen+1) {
-        D("%s: Could not connect to %s pipe service: %s", __FUNCTION__, pipeName, strerror(errno));
-        if (ret == 0) {
-            errno = ECONNRESET;
-        } else if (ret > 0) {
-            errno = EINVAL;
-        }
-        return -1;
-    }
-
-    return fd;
-}
diff --git a/tools/emulator/system/libqemu/tests.mk b/tools/emulator/system/libqemu/tests.mk
index 66d402b..3e89b23 100644
--- a/tools/emulator/system/libqemu/tests.mk
+++ b/tools/emulator/system/libqemu/tests.mk
@@ -19,12 +19,12 @@
 LOCAL_MODULE := test-libqemu-1
 LOCAL_SRC_FILES := test_guest_1.c test_util.c
 LOCAL_MODULE_TAGS := debug
-LOCAL_STATIC_LIBRARIES := libqemu libcutils
+LOCAL_STATIC_LIBRARIES := libcutils
 include $(BUILD_EXECUTABLE)
 
 include $(CLEAR_VARS)
 LOCAL_MODULE := test-libqemu-2
 LOCAL_SRC_FILES := test_guest_2.c test_util.c
 LOCAL_MODULE_TAGS := debug
-LOCAL_STATIC_LIBRARIES := libqemu libcutils
+LOCAL_STATIC_LIBRARIES := libcutils
 include $(BUILD_EXECUTABLE)