summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorKonstantin Käfer <github@kkaefer.com>2014-01-07 12:10:14 +0100
committerKonstantin Käfer <github@kkaefer.com>2014-01-07 12:10:14 +0100
commit44b43fe5a608ef0d2f83b2c99ec5b87c6e00f6e0 (patch)
treea65c62c85ee579e45ae30fd406a81bb7d9f03a0a /Makefile
downloadqtlocation-mapboxgl-44b43fe5a608ef0d2f83b2c99ec5b87c6e00f6e0.tar.gz
glfw version of sample app
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile41
1 files changed, 41 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000000..106055e55d
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,41 @@
+CXXFLAGS = -Wall -Wextra -std=c++11 -stdlib=libc++ -fno-exceptions
+CPPFLAGS = -O3 -DDEBUG
+INCLUDE = -Iinclude
+
+
+
+SRCS += src/map/map.cpp
+SRCS += src/map/tile.cpp
+SRCS += src/map/transform.cpp
+SRCS += src/geometry/linevertexbuffer.cpp
+SRCS += src/renderer/painter.cpp
+SRCS += src/renderer/shader.cpp
+SRCS += src/renderer/shader-fill.cpp
+SRCS += src/renderer/shader-line.cpp
+SRCS += src/util/mat4.c
+
+SRCS += macosx/main.mm
+
+OBJS = $(patsubst %.mm,%.o,$(patsubst %.cpp,%.o,$(patsubst %.c,%.o,$(SRCS))))
+
+main: macosx
+
+library: $(OBJS)
+
+macosx: library
+ $(CXX) $(OBJS) $(INCLUDE) -lglfw3 -framework OpenGL -framework Foundation -o bin/macosx
+
+%.o: %.cpp
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(INCLUDE) -c -o $@ $^
+
+%.o: %.mm
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(INCLUDE) -c -o $@ $^
+
+%.o: %.c
+ $(CC) $(CPPFLAGS) $(INCLUDE) -c -o $@ $^
+
+clean:
+ rm -rf src/*/*.o
+ rm -rf bin/macosx
+
+.PHONY: macosx