Revert "Convert external/libmpeg2 to Android.bp"

This reverts commit 981ea77f2f760fbcaf03ab36e84d72336004f9e4.

Reason for revert:. Broke non-neon builds

Change-Id: I52b298b00f98052ef5f249f88f853b0172aed3de
diff --git a/Android.bp b/Android.bp
deleted file mode 100644
index 07dab31..0000000
--- a/Android.bp
+++ /dev/null
@@ -1,210 +0,0 @@
-cc_library_static {
-    name: "libmpeg2dec",
-
-    cflags: [
-        "-D_LIB",
-        "-DMULTICORE",
-        "-fPIC",
-
-        "-O3",
-        "-DANDROID",
-        "-Werror",
-    ],
-
-    export_include_dirs: [
-        "decoder",
-        "common",
-    ],
-
-    srcs: [
-        "common/impeg2_buf_mgr.c",
-        "common/impeg2_disp_mgr.c",
-        "common/impeg2_format_conv.c",
-        "common/impeg2_globals.c",
-        "common/impeg2_idct.c",
-        "common/impeg2_inter_pred.c",
-        "common/impeg2_job_queue.c",
-        "common/impeg2_mem_func.c",
-        "common/ithread.c",
-        "decoder/impeg2d_api_main.c",
-        "decoder/impeg2d_bitstream.c",
-        "decoder/impeg2d_debug.c",
-        "decoder/impeg2d_dec_hdr.c",
-        "decoder/impeg2d_decoder.c",
-        "decoder/impeg2d_d_pic.c",
-        "decoder/impeg2d_function_selector_generic.c",
-        "decoder/impeg2d_globals.c",
-        "decoder/impeg2d_i_pic.c",
-        "decoder/impeg2d_mc.c",
-        "decoder/impeg2d_mv_dec.c",
-        "decoder/impeg2d_pic_proc.c",
-        "decoder/impeg2d_pnb_pic.c",
-        "decoder/impeg2d_vld.c",
-        "decoder/impeg2d_vld_tables.c",
-        "decoder/impeg2d_deinterlace.c",
-        "common/icv_sad.c",
-        "common/icv_variance.c",
-        "common/ideint.c",
-        "common/ideint_cac.c",
-        "common/ideint_debug.c",
-        "common/ideint_function_selector_generic.c",
-        "common/ideint_utils.c",
-    ],
-
-    arch: {
-        arm: {
-            local_include_dirs: [
-                "decoder/arm",
-                "common/arm",
-            ],
-
-            armv7_a_neon: {
-                srcs: [
-                    "decoder/arm/impeg2d_function_selector.c",
-                    "common/arm/ideint_function_selector.c",
-                    "decoder/arm/impeg2d_function_selector_a9q.c",
-                    "common/arm/ideint_function_selector_a9.c",
-                    "common/arm/icv_sad_a9.s",
-                    "common/arm/icv_variance_a9.s",
-                    "common/arm/ideint_spatial_filter_a9.s",
-                    "common/arm/ideint_cac_a9.s",
-                    "common/arm/impeg2_format_conv.s",
-                    "common/arm/impeg2_idct.s",
-                    "common/arm/impeg2_inter_pred.s",
-                    "common/arm/impeg2_mem_func.s",
-                ],
-                cflags: [
-                    "-UDISABLE_NEON",
-                    "-UDEFAULT_ARCH",
-                    "-DDEFAULT_ARCH=D_ARCH_ARM_A9Q",
-                ],
-            },
-
-            cflags: [
-                "-DDISABLE_NEONINTR",
-                "-DARM",
-                "-DARMGCC",
-
-                // These are overriden by armv7_a_neon
-                "-DDISABLE_NEON",
-                "-DDEFAULT_ARCH=D_ARCH_ARM_NONEON",
-            ],
-            instruction_set: "arm",
-        },
-
-        arm64: {
-            cflags: [
-                "-DARMV8",
-                "-DDISABLE_NEONINTR",
-                "-DARM",
-                "-DARMGCC",
-
-                "-DDEFAULT_ARCH=D_ARCH_ARMV8_GENERIC",
-            ],
-            local_include_dirs: [
-                "decoder/arm",
-                "common/armv8",
-            ],
-
-            srcs: [
-                "decoder/arm/impeg2d_function_selector.c",
-                "decoder/arm/impeg2d_function_selector_av8.c",
-                "common/arm/ideint_function_selector.c",
-                "common/arm/ideint_function_selector_av8.c",
-                "common/armv8/icv_sad_av8.s",
-                "common/armv8/icv_variance_av8.s",
-                "common/armv8/ideint_spatial_filter_av8.s",
-                "common/armv8/ideint_cac_av8.s",
-                "common/armv8/impeg2_neon_macros.s",
-                "common/armv8/impeg2_format_conv.s",
-                "common/armv8/impeg2_idct.s",
-                "common/armv8/impeg2_inter_pred.s",
-                "common/armv8/impeg2_mem_func.s",
-            ],
-        },
-
-        mips: {
-            local_include_dirs: ["common/mips"],
-
-            srcs: [
-                "decoder/mips/impeg2d_function_selector.c",
-                "common/mips/ideint_function_selector.c",
-            ],
-        },
-
-        mips64: {
-            local_include_dirs: ["common/mips"],
-
-            srcs: [
-                "decoder/mips/impeg2d_function_selector.c",
-                "common/mips/ideint_function_selector.c",
-            ],
-        },
-
-        x86: {
-            cflags: [
-                "-DX86",
-                "-DDISABLE_AVX2",
-                "-msse4.2",
-                "-mno-avx",
-                "-DDEFAULT_ARCH=D_ARCH_X86_SSE42",
-            ],
-
-            local_include_dirs: [
-                "decoder/x86",
-                "common/x86",
-            ],
-
-            srcs: [
-                "decoder/x86/impeg2d_function_selector.c",
-                "decoder/x86/impeg2d_function_selector_avx2.c",
-                "decoder/x86/impeg2d_function_selector_ssse3.c",
-                "decoder/x86/impeg2d_function_selector_sse42.c",
-                "common/x86/ideint_function_selector.c",
-                "common/x86/ideint_function_selector_ssse3.c",
-                "common/x86/ideint_function_selector_sse42.c",
-                "common/x86/icv_variance_ssse3.c",
-                "common/x86/icv_sad_ssse3.c",
-                "common/x86/ideint_cac_ssse3.c",
-                "common/x86/ideint_spatial_filter_ssse3.c",
-                "common/x86/impeg2_idct_recon_sse42_intr.c",
-                "common/x86/impeg2_inter_pred_sse42_intr.c",
-                "common/x86/impeg2_mem_func_sse42_intr.c",
-            ],
-        },
-
-        x86_64: {
-            cflags: [
-                "-DX86",
-                "-DDISABLE_AVX2",
-                "-msse4.2",
-                "-mno-avx",
-                "-DDEFAULT_ARCH=D_ARCH_X86_SSE42",
-            ],
-
-            local_include_dirs: [
-                "decoder/x86",
-                "common/x86",
-            ],
-
-            srcs: [
-                "decoder/x86/impeg2d_function_selector.c",
-                "decoder/x86/impeg2d_function_selector_avx2.c",
-                "decoder/x86/impeg2d_function_selector_ssse3.c",
-                "decoder/x86/impeg2d_function_selector_sse42.c",
-                "common/x86/ideint_function_selector.c",
-                "common/x86/ideint_function_selector_ssse3.c",
-                "common/x86/ideint_function_selector_sse42.c",
-                "common/x86/icv_variance_ssse3.c",
-                "common/x86/icv_sad_ssse3.c",
-                "common/x86/ideint_cac_ssse3.c",
-                "common/x86/ideint_spatial_filter_ssse3.c",
-                "common/x86/impeg2_idct_recon_sse42_intr.c",
-                "common/x86/impeg2_inter_pred_sse42_intr.c",
-                "common/x86/impeg2_mem_func_sse42_intr.c",
-            ],
-        },
-    },
-}
-
-subdirs = ["test"]
diff --git a/Android.mk b/Android.mk
new file mode 100644
index 0000000..4668c52
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,6 @@
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+# decoder
+include $(LOCAL_PATH)/decoder.mk
+
diff --git a/decoder.arm.mk b/decoder.arm.mk
new file mode 100644
index 0000000..c3af911
--- /dev/null
+++ b/decoder.arm.mk
@@ -0,0 +1,31 @@
+libmpeg2d_inc_dir_arm   +=  $(LOCAL_PATH)/decoder/arm
+libmpeg2d_inc_dir_arm   +=  $(LOCAL_PATH)/common/arm
+
+libmpeg2d_srcs_c_arm    +=  decoder/arm/impeg2d_function_selector.c
+libmpeg2d_srcs_c_arm    +=  common/arm/ideint_function_selector.c
+libmpeg2d_cflags_arm    += -DDISABLE_NEONINTR  -DARM -DARMGCC
+
+LOCAL_ARM_MODE         := arm
+
+ifeq ($(ARCH_ARM_HAVE_NEON),true)
+libmpeg2d_srcs_c_arm    +=  decoder/arm/impeg2d_function_selector_a9q.c
+libmpeg2d_srcs_c_arm    +=  common/arm/ideint_function_selector_a9.c
+libmpeg2d_srcs_asm_arm    +=  common/arm/icv_sad_a9.s
+libmpeg2d_srcs_asm_arm    +=  common/arm/icv_variance_a9.s
+libmpeg2d_srcs_asm_arm    +=  common/arm/ideint_spatial_filter_a9.s
+libmpeg2d_srcs_asm_arm    +=  common/arm/ideint_cac_a9.s
+libmpeg2d_srcs_asm_arm    +=  common/arm/impeg2_format_conv.s
+libmpeg2d_srcs_asm_arm    +=  common/arm/impeg2_idct.s
+libmpeg2d_srcs_asm_arm    +=  common/arm/impeg2_inter_pred.s
+libmpeg2d_srcs_asm_arm    +=  common/arm/impeg2_mem_func.s
+libmpeg2d_cflags_arm += -DDEFAULT_ARCH=D_ARCH_ARM_A9Q
+else
+libmpeg2d_cflags_arm += -DDISABLE_NEON -DDEFAULT_ARCH=D_ARCH_ARM_NONEON
+endif
+
+LOCAL_SRC_FILES_arm += $(libmpeg2d_srcs_c_arm) $(libmpeg2d_srcs_asm_arm)
+LOCAL_C_INCLUDES_arm += $(libmpeg2d_inc_dir_arm)
+LOCAL_CFLAGS_arm += $(libmpeg2d_cflags_arm)
+
+# CLANG WORKAROUNDS
+LOCAL_CLANG_ASFLAGS_arm += $(addprefix -Wa$(comma)-I,$(libmpeg2d_inc_dir_arm))
diff --git a/decoder.arm64.mk b/decoder.arm64.mk
new file mode 100644
index 0000000..6770ea0
--- /dev/null
+++ b/decoder.arm64.mk
@@ -0,0 +1,30 @@
+libmpeg2d_cflags_arm64 += -DARMV8
+libmpeg2d_cflags_arm64 += -DDISABLE_NEONINTR  -DARM -DARMGCC
+
+libmpeg2d_inc_dir_arm64   +=  $(LOCAL_PATH)/decoder/arm
+libmpeg2d_inc_dir_arm64   +=  $(LOCAL_PATH)/common/armv8
+
+libmpeg2d_srcs_c_arm64    +=  decoder/arm/impeg2d_function_selector.c
+
+libmpeg2d_srcs_c_arm64      +=  decoder/arm/impeg2d_function_selector_av8.c
+libmpeg2d_srcs_c_arm64      +=  common/arm/ideint_function_selector.c
+libmpeg2d_srcs_c_arm64      +=  common/arm/ideint_function_selector_av8.c
+libmpeg2d_srcs_asm_arm64    +=  common/armv8/icv_sad_av8.s
+libmpeg2d_srcs_asm_arm64    +=  common/armv8/icv_variance_av8.s
+libmpeg2d_srcs_asm_arm64    +=  common/armv8/ideint_spatial_filter_av8.s
+libmpeg2d_srcs_asm_arm64    +=  common/armv8/ideint_cac_av8.s
+
+libmpeg2d_srcs_asm_arm64    +=  common/armv8/impeg2_neon_macros.s
+libmpeg2d_srcs_asm_arm64    +=  common/armv8/impeg2_format_conv.s
+libmpeg2d_srcs_asm_arm64    +=  common/armv8/impeg2_idct.s
+libmpeg2d_srcs_asm_arm64    +=  common/armv8/impeg2_inter_pred.s
+libmpeg2d_srcs_asm_arm64    +=  common/armv8/impeg2_mem_func.s
+libmpeg2d_cflags_arm += -DDEFAULT_ARCH=D_ARCH_ARMV8_GENERIC
+
+
+LOCAL_SRC_FILES_arm64 += $(libmpeg2d_srcs_c_arm64) $(libmpeg2d_srcs_asm_arm64)
+LOCAL_C_INCLUDES_arm64 += $(libmpeg2d_inc_dir_arm64)
+LOCAL_CFLAGS_arm64 += $(libmpeg2d_cflags_arm64)
+
+# CLANG WORKAROUNDS
+LOCAL_CLANG_ASFLAGS_arm64 += $(addprefix -Wa$(comma)-I,$(libmpeg2d_inc_dir_arm64))
diff --git a/decoder.mips.mk b/decoder.mips.mk
new file mode 100644
index 0000000..7aaa724
--- /dev/null
+++ b/decoder.mips.mk
@@ -0,0 +1,6 @@
+libmpeg2d_inc_dir_mips  +=  $(LOCAL_PATH)/common/mips
+
+libmpeg2d_srcs_c_mips   +=  decoder/mips/impeg2d_function_selector.c
+libmpeg2d_srcs_c_mips   +=  common/mips/ideint_function_selector.c
+LOCAL_C_INCLUDES_mips   += $(libmpeg2d_inc_dir_mips)
+LOCAL_SRC_FILES_mips    += $(libmpeg2d_srcs_c_mips)
diff --git a/decoder.mips64.mk b/decoder.mips64.mk
new file mode 100644
index 0000000..ecd5418
--- /dev/null
+++ b/decoder.mips64.mk
@@ -0,0 +1,6 @@
+libmpeg2d_inc_dir_mips64    +=  $(LOCAL_PATH)/common/mips
+
+libmpeg2d_srcs_c_mips64     +=  decoder/mips/impeg2d_function_selector.c
+libmpeg2d_srcs_c_mips64     +=  common/mips/ideint_function_selector.c
+LOCAL_C_INCLUDES_mips64     += $(libmpeg2d_inc_dir_mips)
+LOCAL_SRC_FILES_mips64      += $(libmpeg2d_srcs_c_mips)
diff --git a/decoder.mk b/decoder.mk
new file mode 100644
index 0000000..bf3fa03
--- /dev/null
+++ b/decoder.mk
@@ -0,0 +1,64 @@
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+libmpeg2d_source_dir := $(LOCAL_PATH)
+
+## Arch-common settings
+LOCAL_MODULE := libmpeg2dec
+#LOCAL_32_BIT_ONLY := true
+
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+
+LOCAL_CFLAGS += -D_LIB -DMULTICORE -fPIC
+LOCAL_CFLAGS += -O3 -DANDROID -Werror
+
+LOCAL_C_INCLUDES := $(LOCAL_PATH)/decoder $(LOCAL_PATH)/common
+
+libmpeg2d_srcs_c    += common/impeg2_buf_mgr.c
+libmpeg2d_srcs_c    += common/impeg2_disp_mgr.c
+libmpeg2d_srcs_c    += common/impeg2_format_conv.c
+libmpeg2d_srcs_c    += common/impeg2_globals.c
+libmpeg2d_srcs_c    += common/impeg2_idct.c
+libmpeg2d_srcs_c    += common/impeg2_inter_pred.c
+libmpeg2d_srcs_c    += common/impeg2_job_queue.c
+libmpeg2d_srcs_c    += common/impeg2_mem_func.c
+
+libmpeg2d_srcs_c    += common/ithread.c
+
+libmpeg2d_srcs_c    += decoder/impeg2d_api_main.c
+libmpeg2d_srcs_c    += decoder/impeg2d_bitstream.c
+libmpeg2d_srcs_c    += decoder/impeg2d_debug.c
+libmpeg2d_srcs_c    += decoder/impeg2d_dec_hdr.c
+libmpeg2d_srcs_c    += decoder/impeg2d_decoder.c
+libmpeg2d_srcs_c    += decoder/impeg2d_d_pic.c
+libmpeg2d_srcs_c    += decoder/impeg2d_function_selector_generic.c
+libmpeg2d_srcs_c    += decoder/impeg2d_globals.c
+libmpeg2d_srcs_c    += decoder/impeg2d_i_pic.c
+libmpeg2d_srcs_c    += decoder/impeg2d_mc.c
+libmpeg2d_srcs_c    += decoder/impeg2d_mv_dec.c
+libmpeg2d_srcs_c    += decoder/impeg2d_pic_proc.c
+libmpeg2d_srcs_c    += decoder/impeg2d_pnb_pic.c
+libmpeg2d_srcs_c    += decoder/impeg2d_vld.c
+libmpeg2d_srcs_c    += decoder/impeg2d_vld_tables.c
+libmpeg2d_srcs_c    += decoder/impeg2d_deinterlace.c
+
+libmpeg2d_srcs_c    += common/icv_sad.c
+libmpeg2d_srcs_c    += common/icv_variance.c
+libmpeg2d_srcs_c    += common/ideint.c
+libmpeg2d_srcs_c    += common/ideint_cac.c
+libmpeg2d_srcs_c    += common/ideint_debug.c
+libmpeg2d_srcs_c    += common/ideint_function_selector_generic.c
+libmpeg2d_srcs_c    += common/ideint_utils.c
+
+LOCAL_SRC_FILES := $(libmpeg2d_srcs_c) $(libmpeg2d_srcs_asm)
+
+
+# Load the arch-specific settings
+include $(LOCAL_PATH)/decoder.arm.mk
+include $(LOCAL_PATH)/decoder.arm64.mk
+include $(LOCAL_PATH)/decoder.x86.mk
+include $(LOCAL_PATH)/decoder.x86_64.mk
+include $(LOCAL_PATH)/decoder.mips.mk
+include $(LOCAL_PATH)/decoder.mips64.mk
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/decoder.x86.mk b/decoder.x86.mk
new file mode 100644
index 0000000..1b42fed
--- /dev/null
+++ b/decoder.x86.mk
@@ -0,0 +1,28 @@
+libmpeg2d_cflags_x86 += -DX86 -DDISABLE_AVX2 -m32 -msse4.2 -mno-avx -DDEFAULT_ARCH=D_ARCH_X86_SSE42
+
+libmpeg2d_inc_dir_x86   +=  $(LOCAL_PATH)/decoder/x86
+libmpeg2d_inc_dir_x86   +=  $(LOCAL_PATH)/common/x86
+
+libmpeg2d_srcs_c_x86    +=  decoder/x86/impeg2d_function_selector.c
+libmpeg2d_srcs_c_x86    +=  decoder/x86/impeg2d_function_selector_avx2.c
+libmpeg2d_srcs_c_x86    +=  decoder/x86/impeg2d_function_selector_ssse3.c
+libmpeg2d_srcs_c_x86    +=  decoder/x86/impeg2d_function_selector_sse42.c
+libmpeg2d_srcs_c_x86    +=  common/x86/ideint_function_selector.c
+libmpeg2d_srcs_c_x86    +=  common/x86/ideint_function_selector_ssse3.c
+libmpeg2d_srcs_c_x86    +=  common/x86/ideint_function_selector_sse42.c
+
+libmpeg2d_srcs_c_x86    +=  common/x86/icv_variance_ssse3.c
+libmpeg2d_srcs_c_x86    +=  common/x86/icv_sad_ssse3.c
+libmpeg2d_srcs_c_x86    +=  common/x86/ideint_cac_ssse3.c
+libmpeg2d_srcs_c_x86    +=  common/x86/ideint_spatial_filter_ssse3.c
+
+libmpeg2d_srcs_c_x86    +=  common/x86/impeg2_idct_recon_sse42_intr.c
+libmpeg2d_srcs_c_x86    +=  common/x86/impeg2_inter_pred_sse42_intr.c
+libmpeg2d_srcs_c_x86    +=  common/x86/impeg2_mem_func_sse42_intr.c
+
+LOCAL_SRC_FILES_x86 += $(libmpeg2d_srcs_c_x86) $(libmpeg2d_srcs_asm_x86)
+LOCAL_C_INCLUDES_x86 += $(libmpeg2d_inc_dir_x86)
+LOCAL_CFLAGS_x86 += $(libmpeg2d_cflags_x86)
+
+
+
diff --git a/decoder.x86_64.mk b/decoder.x86_64.mk
new file mode 100644
index 0000000..f2ba61d
--- /dev/null
+++ b/decoder.x86_64.mk
@@ -0,0 +1,28 @@
+libmpeg2d_cflags_x86_64 += -DX86 -DDISABLE_AVX2 -m64 -msse4.2 -mno-avx  -DDEFAULT_ARCH=D_ARCH_X86_SSE42
+
+libmpeg2d_inc_dir_x86_64   +=  $(LOCAL_PATH)/decoder/x86
+libmpeg2d_inc_dir_x86_64   +=  $(LOCAL_PATH)/common/x86
+
+libmpeg2d_srcs_c_x86_64     +=  decoder/x86/impeg2d_function_selector.c
+libmpeg2d_srcs_c_x86_64     +=  decoder/x86/impeg2d_function_selector_avx2.c
+libmpeg2d_srcs_c_x86_64     +=  decoder/x86/impeg2d_function_selector_ssse3.c
+libmpeg2d_srcs_c_x86_64     +=  decoder/x86/impeg2d_function_selector_sse42.c
+libmpeg2d_srcs_c_x86_64     +=  common/x86/ideint_function_selector.c
+libmpeg2d_srcs_c_x86_64     +=  common/x86/ideint_function_selector_ssse3.c
+libmpeg2d_srcs_c_x86_64     +=  common/x86/ideint_function_selector_sse42.c
+
+libmpeg2d_srcs_c_x86_64     +=  common/x86/icv_variance_ssse3.c
+libmpeg2d_srcs_c_x86_64     +=  common/x86/icv_sad_ssse3.c
+libmpeg2d_srcs_c_x86_64     +=  common/x86/ideint_cac_ssse3.c
+libmpeg2d_srcs_c_x86_64     +=  common/x86/ideint_spatial_filter_ssse3.c
+
+libmpeg2d_srcs_c_x86_64     +=  common/x86/impeg2_idct_recon_sse42_intr.c
+libmpeg2d_srcs_c_x86_64     +=  common/x86/impeg2_inter_pred_sse42_intr.c
+libmpeg2d_srcs_c_x86_64     +=  common/x86/impeg2_mem_func_sse42_intr.c
+
+LOCAL_SRC_FILES_x86_64 += $(libmpeg2d_srcs_c_x86_64) $(libmpeg2d_srcs_asm_x86_64)
+LOCAL_C_INCLUDES_x86_64 += $(libmpeg2d_inc_dir_x86_64)
+LOCAL_CFLAGS_x86_64 += $(libmpeg2d_cflags_x86_64)
+
+
+
diff --git a/test/Android.bp b/test/Android.bp
deleted file mode 100644
index d1cbc2b..0000000
--- a/test/Android.bp
+++ /dev/null
@@ -1,16 +0,0 @@
-cc_binary {
-    name: "mpeg2dec",
-
-    cflags: [
-        "-DPROFILE_ENABLE",
-        "-DMD5_DISABLE",
-        "-DARM",
-        "-fPIC",
-    ],
-    local_include_dirs: [
-        "decoder/",
-    ],
-    srcs: ["decoder/main.c"],
-    static_libs: ["libmpeg2dec"],
-    shared_libs: ["liblog"],
-}
diff --git a/test/Android.mk b/test/Android.mk
new file mode 100644
index 0000000..7807003
--- /dev/null
+++ b/test/Android.mk
@@ -0,0 +1,5 @@
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+# decoder
+include $(LOCAL_PATH)/decoder.mk
diff --git a/test/decoder.mk b/test/decoder.mk
new file mode 100644
index 0000000..9296620
--- /dev/null
+++ b/test/decoder.mk
@@ -0,0 +1,13 @@
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE    := mpeg2dec
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_CFLAGS := -DPROFILE_ENABLE -DMD5_DISABLE -DARM  -fPIC
+LOCAL_C_INCLUDES += $(LOCAL_PATH)/../decoder $(LOCAL_PATH)/../common $(LOCAL_PATH)/decoder/
+LOCAL_SRC_FILES := decoder/main.c
+LOCAL_STATIC_LIBRARIES := libmpeg2dec
+LOCAL_SHARED_LIBRARIES := liblog
+include $(BUILD_EXECUTABLE)