OS = $(shell uname) ifeq ($(OS),Darwin) CHECK = OSX CC = g++ game.cpp -framework Cocoa -framework OpenGL -framework IOKit -framework CoreVideo -lglfw3 -lglew -Wall -o game endif ifeq ($(OS),Lolbol) CHECK = LINUX CC = g++ game.cpp -lglfw3 -lGLEW -lGL -ldl -lX11 -lXrandr -lXxf86vm -lXinerama -lXcursor -pthread -Wall -std=c++0x -o game endif game: game.cpp @echo $(CHECK) $(CC) clean: rm -f game