From 8bb5820b4caf485a7ca3fdee33b9849cd2a64c4c Mon Sep 17 00:00:00 2001 From: Mathew Wicks Date: Thu, 6 Jan 2022 23:59:51 +1100 Subject: [PATCH] Use pkg-config to locate libusb-1.0 --- Makefile | 2 +- Readme.md | 6 ++++-- main.c | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index b6e685d..8ea337a 100755 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ rpiboot: main.c msd/bootcode.h msd/start.h msd/bootcode4.h msd/start4.h - $(CC) -Wall -Wextra -g -o $@ $< -lusb-1.0 + $(CC) -Wall -Wextra -g -o $@ $< `pkg-config --cflags --libs libusb-1.0` %.h: %.bin ./bin2c ./bin2c $< $@ diff --git a/Readme.md b/Readme.md index 7c072c9..2aaa541 100644 --- a/Readme.md +++ b/Readme.md @@ -28,13 +28,15 @@ From a macOS machine, you can also run usbboot, just follow the same steps: 1. Clone the `usbboot` repository 2. Install `libusb` (`brew install libusb`) -3. Build using make -4. Run the binary +3. Install `pkg-config` (`brew install pkg-config`) +4. Build using make +5. Run the binary ``` git clone --depth=1 https://github.com/raspberrypi/usbboot cd usbboot brew install libusb +brew install pkg-config make sudo ./rpiboot ``` diff --git a/main.c b/main.c index 1732afa..1899f6b 100644 --- a/main.c +++ b/main.c @@ -1,4 +1,4 @@ -#include +#include #include #include #include -- libgit2 0.21.4