macOS symbol/conditional for Makefiles (porting)

Christoph Kukulies kuku at
Mon Dec 28 12:12:48 UTC 2020

I’m trying to compile a package „blackmagic“ (a microcontroller gdb debugging and flashing program addendum to gdb).

It has some issues like missing packages (libftdi1 - I was able to add that via macports)

Now I want to add some condional in the Makefile like this:

ifdef macOS

CFLAGS += -I/opt/local/include


Only, macOS isn’t just the variable that works. Does macOS supply any built-in variable for building that if block?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3363 bytes
Desc: not available
URL: <>

More information about the macports-users mailing list