Quantcast
Channel: User koan - Stack Overflow
Viewing all articles
Browse latest Browse all 40

Answer by koan for makefile with OS dependent compiler

$
0
0

If you are compiling on MacOS X and Linux then you can put the following in your makefile:

UNAME := $(shell uname)ifeq ($(UNAME), Darwin)CFLAGS = -Ofastendififeq ($(UNAME), Linux)CFLAGS = -O3endif# etc

Viewing all articles
Browse latest Browse all 40

Trending Articles