dlbeer/mspdebug

Makefile doesn't set needed -framework PORTS_LDFLAGS for Fink

nieder opened this issue · 1 comments

Makefile only sets -framework IOKit -framework CoreFoundation for MacPorts and homebrew. When building mspdebug with Fink, those flags aren't added and the build fails with the relevant missing symbols. Adding them at line 76 makes the build finish.

mspdebug/Makefile

Lines 74 to 85 in 66dd71e

ifeq ($(shell fink -V > /dev/null 2>&1 && echo ok),ok)
PORTS_CFLAGS := $(shell pkg-config --cflags hidapi libusb)
PORTS_LDFLAGS := $(shell pkg-config --libs hidapi libusb) -ltermcap -pthread
else ifeq ($(shell brew --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 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
PORTS_CFLAGS := -I/opt/local/include
PORTS_LDFLAGS := -L/opt/local/lib -lhidapi -framework IOKit -framework CoreFoundation

Is there some issue that needs the various packagers to have their own commands? The MacPorts and Homebrew chunks are already the same. Using pkg-config should be enough already to pick up any differences between the various systems w/out needing mspdebug to keep track of them.

Also, are -ltermcap -pthread needed specifically for Fink? The build finishes fine if I comment those two flags out and I don't see any use of ncurses in the code.