LOCAL_PATH := $(call my-dir)

libefivar_src_files := \
	efivar.c \
	efivarfs.c \
	guid.c \
	lib.c \
	vars.c


include $(CLEAR_VARS)

ifeq ($(TARGET_KERNEL_ARCH),x86_64)
LOCAL_CFLAGS += -DFORCE_32BIT_EBM_RUN_ON_64BIT_OS
endif

LOCAL_SRC_FILES := $(libefivar_src_files)
LOCAL_C_INCLUDES := $(ANDROID_BUILD_TOP)/external/oprofile/libpopt
LOCAL_PRELINK_MODULE := false
LOCAL_MODULE := libefivar
LOCAL_MODULE_TAGS := eng
LOCAL_STATIC_LIBRARIES := liboprofile_popt
include $(BUILD_STATIC_LIBRARY)

LOCAL_PATH := $(call my-dir)

libefivar_src_files := \
	efivarfs.c \
	guid.c \
	lib.c \
	vars.c


include $(CLEAR_VARS)

ifeq ($(TARGET_KERNEL_ARCH),x86_64)
LOCAL_CFLAGS += -DFORCE_32BIT_EBM_RUN_ON_64BIT_OS
endif

LOCAL_SRC_FILES := $(libefivar_src_files)
LOCAL_C_INCLUDES := $(ANDROID_BUILD_TOP)/external/oprofile/libpopt
LOCAL_PRELINK_MODULE := false
LOCAL_MODULE := libefivar
LOCAL_MODULE_TAGS := eng
LOCAL_STATIC_LIBRARIES := liboprofile_popt
include $(BUILD_STATIC_LIBRARY)

# efivar Application
include $(CLEAR_VARS)
ifeq ($(TARGET_KERNEL_ARCH),x86_64)
LOCAL_CFLAGS += -DFORCE_32BIT_EBM_RUN_ON_64BIT_OS
endif

LOCAL_SRC_FILES :=	efivar.c
LOCAL_C_INCLUDES := $(ANDROID_BUILD_TOP)/external/oprofile/libpopt
LOCAL_MODULE := efivar
LOCAL_MODULE_TAGS := optional
LOCAL_STATIC_LIBRARIES := libefivar liboprofile_popt
include $(BUILD_EXECUTABLE)

Create entry for efivar application
Create entry for efivar application

This patch adds an entry for the efivar application which may be useful
for some debugging applications. It also removes efivar.c from the list
of source files needed for libefivar as it is unneeded for the library.

Change-Id: Ia6eed7e9a44196e7b1e9f58287cfc44b77659328
Signed-off-by: Michael Bergeron <c103c8419fb84b1aa5321be90fd955aa9211e509@intel.com>
Reviewed-on: https://android.intel.com/189229
Reviewed-by: Boie, Andrew P <aab045b28152628be6af0e556050d0381fd0a34d@intel.com>
Reviewed-by: Ionita, Catalin <27b8bd4c7802185e014d4ac970a3bf34154df81c@intel.com>
