Last active
June 12, 2017 14:55
-
-
Save RomuloOliveira/a88ea62a686665c00312 to your computer and use it in GitHub Desktop.
Conditional OS executable - Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UNAME_S := $(shell uname -s) | |
# Note that this ifeq-endif are space-indented for better readability | |
ifeq ($(UNAME_S), Linux) | |
EXECUTABLE ?= linux_executable | |
endif | |
ifeq ($(UNAME_S), Darwin) | |
EXECUTABLE ?= osx_executable | |
endif | |
# noop fallback | |
EXECUTABLE ?= : | |
test: | |
EXECUTABLE "args" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment