I have a package that bundles a library written in C, which is built using a make command in Package Options → Compiler Commands → Execute before.
I've also defined an IDE macro (e.g. PACKAGENAME_DEBUG, either 'On' or 'Off') that controls debugging & optimization flags via Package Options → Custom Options → Conditionals to allow fine-grained control over those options on a per-project basis.
The IDE macro works just fine for FPC flags (CustomOptions), but so far I haven't found a way to conditionally pass options to make (e.g. make CFLAGS=$(CustomCFLAGS) doesn't work).
Now my question is: How can I pass a value from Package Options → Custom Options → Conditionals to a program executed before compilation?