I have a (GNU) makefile with an all target that looks like this:
.PHONY: all
all: $(unittest++_tests_exe) $(cmockery_tests_exe)
@echo Running UnitTest++ tests...
@./$(unittest++_tests_exe)
@echo Running Cmockery tests...
@./$(cmockery_tests_exe)
The UnitTest++ tests run on both Linux and Mac OS X, and the Cmockery tests run only on Linux.
How do I modify the dependencies and rules so that make all only builds and runs $(unittest++_tests_exe) on Mac OS X?
T.E.D.‘s answer triggered me to come up with the following:
It seems to work, but I welcome your suggestions.