From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Tyser Date: Thu, 12 Mar 2009 14:48:49 -0500 Subject: [U-Boot] [PATCH 00/26 v2] tools/Makefile cleanup and win32 tool support Message-ID: <1236887355-31359-1-git-send-email-ptyser@xes-inc.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de This patch series attempts to do 2 things: 1. Add support for generating win32 versions of the tools in tools/ 2. Cleanup tools/Makefile somewhat In the process of #1 I couldn't help but work on #2 a bit:) Let me know if people would prefer the patches split up. The win32 tools support is based on the patch found in the email thread "Add native win32 mkimage support". It is different from the original patch in that it: 1. Supports all tools in tools/ (original only supported mkimage) 2. Uses common swap routines instead of re-implementing 3. Got rid of MINGW_COMPILE variable and used HOST* variables instead 4. Updated top-level Makefile to remove all generated *.exe files Changes since v1: - Made changes recommended by Mike Frysinger * Rewordings, generic os_support.[ch] files, style changes, define __KERNEL_STRICT_NAMES for tool builds - Removed symlinking of header/source files into tools/ * The original code created build rules for files to be symlinked into the tools directory which had some shortcomings: - 2 make rules for every file - 1 for linking, 1 for compilation - Ugly clean target (rm specific files which were symlinks) - dependencies weren't auto-generated - Auto-generated dependencies for tools/ files - Remove individual file build rules in favor of a few generic build rules - Cleaned up HOSTARCH, HOSTOS, HOST_CFLAGS, and HOST_LDFLAGS - Rebased on TOT Peter Tyser (26): Makefile: Make autoconf.mk a dependency of the depend target Makefile: Add removal of *.exe files to clean target common/Makefile: Conditionally compile env_embedded.o elf.h: Use stdint.h to provide standard typedefs for WIN32 gen_eth_addr: Use POSIX rand() and srand() tools/Makefile: Remove HOSTARCH HOSTOS defines tools/Makefile: Remove inappropriate double-tabs tools/Makefile: Split variable declarations into multiple lines tools/Makefile: Build bmp_logo only when LCD or VIDEO logos are enabled tools/Makefile: Make img2srec dependent upon CONFIG_CMD_LOADS tools/Makefile: Make ubsha1 dependent upon CONFIG_SHA1_CHECK_UB_IMG tools/Makefile: Make inca-swap-bytes dependent on CONFIG_INCA_IP tools/Makefile: Make envcrc dependent upon CONFIG_ENV_IS_EMBEDDED tools/Makefile: Make gen_eth_addr dependent upon CONFIG_CMD_NET tools/Makefile: Compile ncb when CONFIG_NETCONSOLE tools/Makefile: Add tools/ to the include search path tools/Makefile: Give precedence to U-Boot's include directory tools/Makefile: Add libfdt/ to the include search path tools/Makefile: Remove symlinks for fdt targets tools/Makefile: Dynamically generate libfdt object dependencies tools/Makefile: Remove symlinks for remaining source files tools/Makefile: Use auto-generated object file dependencies tools/Makefile: Create generic build rules tools/Makefile: Simplify HOST_CFLAGS/HOST_LDFLAGS generation Add support for building native win32 tools Delete now unused tools/Makefile.win32 Makefile | 22 ++-- README | 10 ++ common/Makefile | 2 +- doc/README.NetConsole | 6 +- include/elf.h | 7 +- include/image.h | 2 + include/libfdt_env.h | 12 ++ tools/Makefile | 314 ++++++++++++++++++------------------------------- tools/Makefile.win32 | 37 ------ tools/gen_eth_addr.c | 6 +- tools/mingw_support.c | 79 ++++++++++++ tools/mingw_support.h | 51 ++++++++ tools/mkimage.h | 7 +- tools/os_support.c | 24 ++++ tools/os_support.h | 29 +++++ tools/ubsha1.c | 3 + 16 files changed, 349 insertions(+), 262 deletions(-) delete mode 100644 tools/Makefile.win32 create mode 100644 tools/mingw_support.c create mode 100644 tools/mingw_support.h create mode 100644 tools/os_support.c create mode 100644 tools/os_support.h