forked from Hopson97/MineCraft-One-Week-Challenge
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
21 lines (17 loc) · 594 Bytes
/
Copy pathMakefile
File metadata and controls
21 lines (17 loc) · 594 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
CFILES=$(shell find Source -name '*.cpp')
OFILES=$(patsubst %.cpp,%.o,$(CFILES))
TARGET=MinecraftWeek
OS := $(shell uname)
ifeq ($(OS),Darwin)
FLAGS=-framework OpenGL -lpthread -lsfml-system -lsfml-window -lsfml-graphics -lGLEW -L/usr/local/lib
CC_FLAGS=-std=c++1y -I/usr/local/include -O3 -march=native -mtune=native
else
FLAGS=-lGL -lpthread -lsfml-system -lsfml-window -lsfml-graphics -lGLEW
-CC_FLAGS=-std=c++1y -O3 -march=native -mtune=native
endif
$(TARGET): $(OFILES)
g++ -g -o $(TARGET) $(OFILES) $(FLAGS)
%.o: %.cpp
g++ $(CC_FLAGS) -o $@ -c $<
clean:
rm -rf $(TARGET) $(OFILES)