diff options
author | Konstantin Käfer <github@kkaefer.com> | 2014-01-07 16:52:23 +0100 |
---|---|---|
committer | Konstantin Käfer <github@kkaefer.com> | 2014-01-07 16:52:23 +0100 |
commit | 528eaf475e084508cb2d2d26df7d4136f1eb5e04 (patch) | |
tree | 87f9a7ecec23cb7cc37450e7cd5f34fa6248f750 /Makefile | |
parent | 044a7b5dcd92b1ba095f0768d24aa504fdf71a16 (diff) | |
download | qtlocation-mapboxgl-528eaf475e084508cb2d2d26df7d4136f1eb5e04.tar.gz |
emscripten support
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 20 |
1 files changed, 14 insertions, 6 deletions
@@ -12,17 +12,17 @@ SRCS += src/renderer/painter.cpp SRCS += src/renderer/shader.cpp SRCS += src/renderer/shader-fill.cpp SRCS += src/renderer/shader-line.cpp +SRCS += src/shader/shaders.c SRCS += src/util/mat4.c -OBJS = $(patsubst %.mm,%.o,$(patsubst %.cpp,%.o,$(patsubst %.c,%.o,$(SRCS)))) +# OBJS = $(patsubst %.mm,%.o,$(patsubst %.cpp,%.o,$(patsubst %.c,%.o,$(SRCS)))) main: macosx -library: $(OBJS) - macosx: SRCS += macosx/main.mm -macosx: library - $(CXX) $(OBJS) $(INCLUDE) -lglfw3 -framework OpenGL -framework Foundation -o macosx/main +emscripten: SRCS += emscripten/main.cpp + +macosx emscripten: OBJS = $(patsubst %.mm,%.o,$(patsubst %.cpp,%.o,$(patsubst %.c,%.o,$(SRCS)))) %.o: %.cpp $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(INCLUDE) -c -o $@ $^ @@ -33,8 +33,16 @@ macosx: library %.o: %.c $(CC) $(CPPFLAGS) $(INCLUDE) -c -o $@ $^ + +.SECONDEXPANSION: +macosx: $$(OBJS) + $(CXX) $(OBJS) $(INCLUDE) -lglfw3 -framework OpenGL -framework Foundation -o macosx/main + +emscripten: $$(OBJS) + $(CXX) $(OBJS) $(INCLUDE) -o emscripten/main.js + clean: rm -rf src/*/*.o rm -rf macosx/main -.PHONY: macosx +.PHONY: macosx emscripten |