Move relocation_packer off libnativehelper.

Also remove other bits of makefile cruft.

Change-Id: I8b69822200959368003a8af9d1595bea9182d6d8
diff --git a/tools/relocation_packer/Android.mk b/tools/relocation_packer/Android.mk
index 2bf77b9..bdb54b7 100644
--- a/tools/relocation_packer/Android.mk
+++ b/tools/relocation_packer/Android.mk
@@ -31,13 +31,10 @@
   src/sleb128.cc \
 
 LOCAL_STATIC_LIBRARIES := libelf libz
-LOCAL_C_INCLUDES := external/elfutils/src/libelf
 LOCAL_MODULE := lib_relocation_packer
 
 LOCAL_CPPFLAGS := $(common_cppflags)
 
-LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
-
 include $(BUILD_HOST_STATIC_LIBRARY)
 
 include $(CLEAR_VARS)
@@ -45,18 +42,15 @@
 LOCAL_CPP_EXTENSION := .cc
 
 LOCAL_SRC_FILES := src/main.cc
-LOCAL_STATIC_LIBRARIES := lib_relocation_packer libelf libz
+LOCAL_STATIC_LIBRARIES := lib_relocation_packer libelf libz libbase
 
 # Statically linking libc++ to make it work from prebuilts
 LOCAL_CXX_STL := libc++_static
-LOCAL_C_INCLUDES := external/elfutils/src/libelf libnativehelper/include
 
 LOCAL_MODULE := relocation_packer
 
 LOCAL_CPPFLAGS := $(common_cppflags)
 
-LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
-
 include $(BUILD_HOST_EXECUTABLE)
 
 include $(CLEAR_VARS)
@@ -71,7 +65,6 @@
   src/packer_unittest.cc \
 
 LOCAL_STATIC_LIBRARIES := lib_relocation_packer libelf libz
-LOCAL_C_INCLUDES := external/elfutils/src/libelf
 
 LOCAL_CPPFLAGS := $(common_cppflags)
 
diff --git a/tools/relocation_packer/src/main.cc b/tools/relocation_packer/src/main.cc
index 8e9de6d..d0a0dd4 100644
--- a/tools/relocation_packer/src/main.cc
+++ b/tools/relocation_packer/src/main.cc
@@ -25,7 +25,7 @@
 #include "elf_traits.h"
 #include "libelf.h"
 
-#include "nativehelper/ScopedFd.h"
+#include <android-base/unique_fd.h>
 
 static void PrintUsage(const char* argv0) {
   std::string temporary = argv0;
@@ -94,7 +94,7 @@
   }
 
   const char* file = argv[argc - 1];
-  ScopedFd fd(open(file, O_RDWR));
+  android::base::unique_fd fd(open(file, O_RDWR));
   if (fd.get() == -1) {
     LOG(ERROR) << file << ": " << strerror(errno);
     return 1;