You can check the output of one of the uname options, and then choose different actions with the makefile depending on this.
Run man uname for details.
In terms of your use of GNU make, you can get the information in a variable from the shell function, and then use ifeq for that variable:
platform=$(shell uname -o) ifeq ($(platform),Cygwin) defrule: echo I am running in Cygwin. else defrule: echo I am running elsewhere. endif
source share