From: Michael McMaster Date: Sun, 27 Oct 2013 11:35:25 +0000 (+1000) Subject: Added Mac OSX support for the bootloaderhost utility (not tested) X-Git-Tag: v3.0~3 X-Git-Url: http://git.codesrc.com/gitweb.cgi?a=commitdiff_plain;h=32a39b08bea769a7a34826bfb07ace86d4880a55;p=SCSI2SD-V6.git Added Mac OSX support for the bootloaderhost utility (not tested) --- diff --git a/software/bootloaderhost/Makefile b/software/bootloaderhost/Makefile index 8f5d66fb..8c090672 100644 --- a/software/bootloaderhost/Makefile +++ b/software/bootloaderhost/Makefile @@ -6,6 +6,7 @@ CYAPI = \ cybootloaderutils/cybtldr_command.c \ cybootloaderutils/cybtldr_parse.c \ +CFLAGS += -Wall -Wno-pointer-sign UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Linux) @@ -15,11 +16,12 @@ endif ifeq ($(UNAME_S),Darwin) # Should match OSX HID_C = hidapi/mac/hid.c + LDFLAGS += -framework IOKit -framework CoreFoundation endif bootloaderhost: main.c $(HID_C) $(CYAPI) - $(CC) $(CFLAGS) -g -I cybootloaderutils -I hidapi/hidapi $^ $(LDFLAGS) -o $@ + $(CC) $(CFLAGS) -I cybootloaderutils -I hidapi/hidapi $^ $(LDFLAGS) -o $@ clean: rm bootloaderhost diff --git a/software/bootloaderhost/main.c b/software/bootloaderhost/main.c index fdeb4afa..c42f41f2 100644 --- a/software/bootloaderhost/main.c +++ b/software/bootloaderhost/main.c @@ -110,10 +110,10 @@ int main(int argc, char* argv[]) switch (c) { case 'v': - sscanf(optarg, "%x", &vendorId); + sscanf(optarg, "%hx", &vendorId); break; case 'p': - sscanf(optarg, "%x", &productId); + sscanf(optarg, "%hx", &productId); break; case '?': usage();