-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
60 lines (48 loc) · 1.59 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#
# Cross Platform Makefile
# Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X
#
# You will need GLFW (http://www.glfw.org):
# Linux:
# apt-get install libglfw3-dev
# Mac OS X:
# brew install glfw
# MSYS2:
# pacman -S --noconfirm --needed mingw-w64-x86_64-toolchain mingw-w64-x86_64-glfw
#
#CXX = g++
#CXX = clang++
EXE = bin/fraktal
UNAME_S := $(shell uname -s)
CXXFLAGS = -I./src/reuse/gl3w -I./src/reuse -I./src/reuse/glfw/include -I./src/reuse/imgui
##---------------------------------------------------------------------
## BUILD FLAGS PER PLATFORM
##---------------------------------------------------------------------
ifeq ($(UNAME_S), Linux) #LINUX
ECHO_MESSAGE = "Linux"
LIBS = -lGL `pkg-config --static --libs glfw3`
CXXFLAGS += `pkg-config --cflags glfw3`
CXXFLAGS += -std=c++11 -Wall -Wformat
CFLAGS = $(CXXFLAGS)
endif
ifeq ($(UNAME_S), Darwin) #APPLE
ECHO_MESSAGE = "Mac OS X"
LIBS = -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo
#LIBS += -L/usr/local/lib -lglfw3
LIBS += -L/usr/local/lib -lglfw
CXXFLAGS += -I/usr/local/include
CXXFLAGS += -std=c++11 -Wall -Wformat
CFLAGS = $(CXXFLAGS)
endif
ifeq ($(findstring MINGW,$(UNAME_S)),MINGW)
ECHO_MESSAGE = "Windows"
LIBS = -lglfw3 -lgdi32 -lopengl32 -limm32
CXXFLAGS += `pkg-config --cflags glfw3`
CXXFLAGS += -std=c++11 -Wall -Wformat
CFLAGS = $(CXXFLAGS)
endif
##---------------------------------------------------------------------
## BUILD RULES
##---------------------------------------------------------------------
all: src/gui.cpp
$(CXX) src/gui.cpp $(CXXFLAGS) $(LIBS) -o $(EXE)