Re: macOS symbol/conditional for Makefiles (porting)

2020-12-28 Thread Ryan Schmidt
On Dec 28, 2020, at 06:12, Christoph Kukulies wrote: > 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

Re: macOS symbol/conditional for Makefiles (porting)

2020-12-28 Thread Christoph Kukulies
Thanks. shell UNAME is a nice trick. $ uname Darwin Christoph Kukulies > Am 28.12.2020 um 21:28 schrieb Ken Cunningham > : > > > Does macOS supply any built-in variable for building that if block? > > > See

Re: macOS symbol/conditional for Makefiles (porting)

2020-12-28 Thread Ken Cunningham
> Does macOS supply any built-in variable for building that if block? See and similar examples for ways of detecting and branching on the OS in Makefiles. Ken

Re: macOS symbol/conditional for Makefiles (porting)

2020-12-28 Thread Richard L. Hamilton
The following script will show you the predefined symbols. #! /bin/sh EMPTY_FILE="${TMPDIR:-/tmp}/t$$.c" rm -f "${EMPTY_FILE}" touch "${EMPTY_FILE}" clang ${1+"${@}"} -E -dM "${EMPTY_FILE}" rm -f "${EMPTY_FILE}" You can change clang to gcc, or to the full path of either, and it will show you

macOS symbol/conditional for Makefiles (porting)

2020-12-28 Thread Christoph Kukulies
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 +=