Detect macports to find hidapi and libusb.

This commit is contained in:
Daniel O'Connor 2018-08-15 13:33:55 +09:30
parent f017df6781
commit 6c82bbf017
1 changed files with 3 additions and 0 deletions

View File

@ -72,6 +72,9 @@ else
else ifeq ($(shell brew --version > /dev/null 2>&1 && echo ok),ok) else ifeq ($(shell brew --version > /dev/null 2>&1 && echo ok),ok)
PORTS_CFLAGS := $(shell pkg-config --cflags hidapi libusb) PORTS_CFLAGS := $(shell pkg-config --cflags hidapi libusb)
PORTS_LDFLAGS := $(shell pkg-config --libs hidapi libusb) -framework IOKit -framework CoreFoundation PORTS_LDFLAGS := $(shell pkg-config --libs hidapi libusb) -framework IOKit -framework CoreFoundation
else ifeq ($(shell port version > /dev/null 2>&1 && echo ok),ok)
PORTS_CFLAGS := $(shell pkg-config --cflags hidapi libusb)
PORTS_LDFLAGS := $(shell pkg-config --libs hidapi libusb) -framework IOKit -framework CoreFoundation
else else
PORTS_CFLAGS := -I/opt/local/include PORTS_CFLAGS := -I/opt/local/include
PORTS_LDFLAGS := -L/opt/local/lib -lhidapi -framework IOKit -framework CoreFoundation PORTS_LDFLAGS := -L/opt/local/lib -lhidapi -framework IOKit -framework CoreFoundation