From ed1dff172e48275b33bd0b29c1a073ee9b3d8cb2 Mon Sep 17 00:00:00 2001 From: Michael McMaster Date: Mon, 28 Oct 2013 21:08:29 +1000 Subject: [PATCH] Added Windows support for the bootloaderhost utility Compile on Linux using the mingw cross compiler. --- software/bootloaderhost/Makefile.mingw | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 software/bootloaderhost/Makefile.mingw diff --git a/software/bootloaderhost/Makefile.mingw b/software/bootloaderhost/Makefile.mingw new file mode 100644 index 00000000..820212fa --- /dev/null +++ b/software/bootloaderhost/Makefile.mingw @@ -0,0 +1,25 @@ +all: build/windows/32bit/bootloaderhost.exe build/windows/64bit/bootloaderhost.exe + +CYAPI = \ + cybootloaderutils/cybtldr_api2.c \ + cybootloaderutils/cybtldr_api.c \ + cybootloaderutils/cybtldr_command.c \ + cybootloaderutils/cybtldr_parse.c \ + +CFLAGS += -Wall -Wno-pointer-sign +LDFLAGS=-mconsole -mwindows -lsetupapi + +HID_C = hidapi/windows/hid.c + + +build/windows/32bit/bootloaderhost.exe: main.c $(HID_C) $(CYAPI) + mkdir -p $(dir $@) + i686-w64-mingw32-gcc $(CFLAGS) -I cybootloaderutils -I hidapi/hidapi $^ $(LDFLAGS) -o $@ + +build/windows/64bit/bootloaderhost.exe: main.c $(HID_C) $(CYAPI) + mkdir -p $(dir $@) + x86_64-w64-mingw32-gcc $(CFLAGS) -I cybootloaderutils -I hidapi/hidapi $^ $(LDFLAGS) -o $@ + +clean: + rm -r build/windows + -- 2.38.5