From f81faacd9751813b913a596533725196b8245e74 Mon Sep 17 00:00:00 2001
From: Jon Turney <jon.turney@dronecode.org.uk>
Date: Sat, 5 Mar 2016 12:56:22 +0000
Subject: [PATCH 04/29] Build minidump_upload and sym_upload for all targets

minidump_upload and sym_upload should probably move from src/tools/linux/ to
a new src/tools/common/, and move linux/http_upload.{cc,.h} up to
src/common/ from src/common/linux/ ?

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
---
 Makefile.am | 36 ++++++++++++++++++++----------------
 1 file changed, 20 insertions(+), 16 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index f0939b8c..fcff8ea7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -344,6 +344,12 @@ bin_PROGRAMS += \
 	src/processor/minidump_stackwalk
 endif !DISABLE_PROCESSOR
 
+if !DISABLE_TOOLS
+bin_PROGRAMS += \
+	src/tools/linux/symupload/minidump_upload \
+	src/tools/linux/symupload/sym_upload
+endif
+
 if LINUX_HOST
 EXTRA_PROGRAMS += \
 	src/client/linux/linux_dumper_unittest_helper
@@ -354,9 +360,7 @@ if !DISABLE_TOOLS
 bin_PROGRAMS += \
 	src/tools/linux/core2md/core2md \
 	src/tools/linux/dump_syms/dump_syms \
-	src/tools/linux/md2core/minidump-2-core \
-	src/tools/linux/symupload/minidump_upload \
-	src/tools/linux/symupload/sym_upload
+	src/tools/linux/md2core/minidump-2-core
 if X86_HOST
 bin_PROGRAMS += \
 	src/tools/mac/dump_syms/dump_syms_mac
@@ -449,6 +453,19 @@ else
 LOG_DRIVER = $(top_srcdir)/autotools/test-driver
 endif
 
+src_tools_linux_symupload_minidump_upload_SOURCES = \
+	src/common/linux/http_upload.cc \
+	src/tools/linux/symupload/minidump_upload.cc
+src_tools_linux_symupload_minidump_upload_LDADD = -lcurl
+
+src_tools_linux_symupload_sym_upload_SOURCES = \
+	src/common/linux/http_upload.cc \
+	src/common/linux/http_upload.h \
+	src/common/linux/symbol_upload.cc \
+	src/common/linux/symbol_upload.h \
+	src/tools/linux/symupload/sym_upload.cc
+src_tools_linux_symupload_sym_upload_LDADD = -lcurl
+
 if LINUX_HOST
 src_client_linux_linux_dumper_unittest_helper_SOURCES = \
 	src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
@@ -598,19 +615,6 @@ src_tools_linux_md2core_minidump_2_core_SOURCES = \
 	src/tools/linux/md2core/minidump-2-core.cc \
 	src/tools/linux/md2core/minidump_memory_range.h
 
-src_tools_linux_symupload_minidump_upload_SOURCES = \
-	src/common/linux/http_upload.cc \
-	src/tools/linux/symupload/minidump_upload.cc
-src_tools_linux_symupload_minidump_upload_LDADD = -lcurl
-
-src_tools_linux_symupload_sym_upload_SOURCES = \
-	src/common/linux/http_upload.cc \
-	src/common/linux/http_upload.h \
-	src/common/linux/symbol_upload.cc \
-	src/common/linux/symbol_upload.h \
-	src/tools/linux/symupload/sym_upload.cc
-src_tools_linux_symupload_sym_upload_LDADD = -lcurl
-
 src_tools_mac_dump_syms_dump_syms_mac_SOURCES = \
 	src/common/dwarf_cfi_to_module.cc \
 	src/common/dwarf_cu_to_module.cc \
-- 
2.15.0

