How to exclude source from compiling in config.make?

I would like to learn how to exclude a source file when compiling an OF project.

I tried

EXCLUDE_FROM_SOURCE = "path/to/ofApp.h"

and

PROJECT_EXCLUSIONS = "path/to/ofApp.h"

But both seems to not work as the project builds fine with ofApp.h file. (if it is excluded, it shouldn’t build as main.cpp includes ofApp.h)

How can I exclude a source file when compiling an OF project using make?

you can’t exclude .h files as those aren’t really compiled but just included by the preprocessor that finds them from the include search paths. you can exclude only source files that get compiled like c and cpp files

1 Like