Commit 8bb5820b4caf485a7ca3fdee33b9849cd2a64c4c

Authored by Mathew Wicks
Committed by Phil Elwell
1 parent e5e49940

Use pkg-config to locate libusb-1.0

Makefile
1 rpiboot: main.c msd/bootcode.h msd/start.h msd/bootcode4.h msd/start4.h 1 rpiboot: main.c msd/bootcode.h msd/start.h msd/bootcode4.h msd/start4.h
2 - $(CC) -Wall -Wextra -g -o $@ $< -lusb-1.0 2 + $(CC) -Wall -Wextra -g -o $@ $< `pkg-config --cflags --libs libusb-1.0`
3 3
4 %.h: %.bin ./bin2c 4 %.h: %.bin ./bin2c
5 ./bin2c $< $@ 5 ./bin2c $< $@
Readme.md
@@ -28,13 +28,15 @@ From a macOS machine, you can also run usbboot, just follow the same steps: @@ -28,13 +28,15 @@ From a macOS machine, you can also run usbboot, just follow the same steps:
28 28
29 1. Clone the `usbboot` repository 29 1. Clone the `usbboot` repository
30 2. Install `libusb` (`brew install libusb`) 30 2. Install `libusb` (`brew install libusb`)
31 -3. Build using make  
32 -4. Run the binary 31 +3. Install `pkg-config` (`brew install pkg-config`)
  32 +4. Build using make
  33 +5. Run the binary
33 34
34 ``` 35 ```
35 git clone --depth=1 https://github.com/raspberrypi/usbboot 36 git clone --depth=1 https://github.com/raspberrypi/usbboot
36 cd usbboot 37 cd usbboot
37 brew install libusb 38 brew install libusb
  39 +brew install pkg-config
38 make 40 make
39 sudo ./rpiboot 41 sudo ./rpiboot
40 ``` 42 ```
1 -#include <libusb-1.0/libusb.h> 1 +#include <libusb.h>
2 #include <stdio.h> 2 #include <stdio.h>
3 #include <stdlib.h> 3 #include <stdlib.h>
4 #include <string.h> 4 #include <string.h>