Quantcast
Viewing all articles
Browse latest Browse all 3

How do I modify the dependencies and rules of a GNU makefile target depending upon the platform (Linux vs. OS X)?

I have a (GNU) makefile with an all target that looks like this:

.PHONY: allall: $(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?


Viewing all articles
Browse latest Browse all 3

Trending Articles