Commit 23f769e9 authored by Ray Bellis's avatar Ray Bellis

updated macOS build

parent 8fc6567a
#
# minipro Makefile for OS X (tested with OS X Yosemite)
# by Maciej Bartosiak
# minipro Makefile for macOS (tested with macOS High Sierra)
# by Maciej Bartosiak, updated by Ray Bellis
#
# This Makefile assumes than libusb-1.0.x is installed and visible for compiler
# This Makefile assumes than libusb-1.0.x is installed and findable via pkg-config
#
VERSION = 0.1
......@@ -16,8 +16,13 @@ MINIPRO = minipro
MINIPRO_QUERY_DB= minipro-query-db
PROGS = $(MINIPRO) $(MINIPRO_QUERY_DB)
CFLAGS = -g -O0 -Wall $(shell pkg-config --cflags libusb-1.0)
LIBS = $(shell pkg-config --libs libusb-1.0) -framework Foundation -framework IOKit
PKG_CONFIG := $(shell which pkg-config 2>/dev/null)
ifeq ($(PKG_CONFIG),)
ERROR := $(error "pkg-config utility not found")
endif
CFLAGS = -g -O0 -Wall $(shell $(PKG_CONFIG) --cflags libusb-1.0)
LIBS = $(shell $(PKG_CONFIG) --libs libusb-1.0) -framework Foundation -framework IOKit
.PHONY: all clean install
......
......@@ -122,18 +122,20 @@ The final RPMs can be found below `~/rpmbuild/RPMS/`
## Installation on macOS
Install `libusb` using brew or MacPorts:
Install `pkg-config` and `libusb` using brew or MacPorts:
```
brew install pkg-config
brew install libusb
brew link libusb
```
or:
```
port install pkgconfig
port install libusb
```
Compile using macOS Makefile:
```
make -f Makefile.macOS
sudo make install
sudo make -f Makefile.macOS install
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment