Use pkg-config on OS/X when Fink is available.

This commit is contained in:
Daniel Beer 2015-03-16 08:18:39 +13:00
parent e6345b1238
commit 74665132bb
1 changed files with 11 additions and 8 deletions

View File

@ -60,10 +60,14 @@ else
endif endif
ifeq ($(UNAME_S),Darwin) # Mac OS X/MacPorts stuff ifeq ($(UNAME_S),Darwin) # Mac OS X/MacPorts stuff
ifeq ($(shell fink -V > /dev/null 2>&1 && echo ok),ok)
PORTS_CFLAGS := $(shell pkg-config --cflags libusb)
PORTS_LDFLAGS := $(shell pkg-config --libs libusb) -ltermcap -pthread
else
PORTS_CFLAGS := -I/opt/local/include PORTS_CFLAGS := -I/opt/local/include
PORTS_LDFLAGS := -L/opt/local/lib PORTS_LDFLAGS := -L/opt/local/lib
else endif
ifneq ($(filter $(UNAME_S),OpenBSD NetBSD DragonFly),) else ifneq ($(filter $(UNAME_S),OpenBSD NetBSD DragonFly),)
PORTS_CFLAGS := $(shell pkg-config --cflags libusb) PORTS_CFLAGS := $(shell pkg-config --cflags libusb)
PORTS_LDFLAGS := $(shell pkg-config --libs libusb) -ltermcap -pthread PORTS_LDFLAGS := $(shell pkg-config --libs libusb) -ltermcap -pthread
else else
@ -71,7 +75,6 @@ else
PORTS_LDFLAGS := PORTS_LDFLAGS :=
endif endif
endif endif
endif
INCLUDES = -I. -Isimio -Iformats -Itransport -Idrivers -Iutil -Iui INCLUDES = -I. -Isimio -Iformats -Itransport -Idrivers -Iutil -Iui
GCC_CFLAGS = -O1 -Wall -Wno-char-subscripts -ggdb GCC_CFLAGS = -O1 -Wall -Wno-char-subscripts -ggdb