CXX = emcc CXXFLAGS = -I${IMGUI_DIR} -I${IMGUI_DIR}/backends LDFLAGS = ${USE_WASM} -sASYNCIFY OUTPUT = imgui.js IMGUI_DIR:=../../../experiments/imgui LIBS = -lGL WEBGL_VER = -s USE_WEBGL2=1 -s USE_GLFW=3 -s FULL_ES3=1 #WEBGL_VER = USE_GLFW=2 USE_WASM = -s WASM=1 .PHONY: go go: ${OUTPUT} ssh stromberg.dnsalias.org 'cd ~/public_html && rm -rf WebGui && mkdir WebGui' reblock-du-tar --directories data imgui.html imgui.data imgui.js imgui.wasm | ssh stromberg.dnsalias.org 'cd ~/public_html/WebGui && tar xfp -' OBJS=main.o imgui_impl_glfw.o imgui_impl_opengl3.o imgui.o imgui_draw.o imgui_widgets.o imgui_tables.o main.o: main.cpp ${CXX} ${CXXFLAGS} -DNO_WINDOW -DDEBUG -c main.cpp -o main.o imgui_impl_glfw.o: ${IMGUI_DIR}/backends/imgui_impl_glfw.cpp ${CXX} ${CXXFLAGS} -c ${IMGUI_DIR}/backends/imgui_impl_glfw.cpp -o imgui_impl_glfw.o imgui_impl_opengl3.o: ${IMGUI_DIR}/backends/imgui_impl_opengl3.cpp ${CXX} ${CXXFLAGS} -c ${IMGUI_DIR}/backends/imgui_impl_opengl3.cpp -o imgui_impl_opengl3.o imgui.o: ${IMGUI_DIR}/imgui.cpp ${CXX} ${CXXFLAGS} -c ${IMGUI_DIR}/imgui.cpp -o imgui.o imgui_draw.o: ${IMGUI_DIR}/imgui_draw.cpp ${CXX} ${CXXFLAGS} -c ${IMGUI_DIR}/imgui_draw.cpp -o imgui_draw.o imgui_widgets.o: ${IMGUI_DIR}/imgui_widgets.cpp ${CXX} ${CXXFLAGS} -c ${IMGUI_DIR}/imgui_widgets.cpp -o imgui_widgets.o imgui_tables.o: ${IMGUI_DIR}/imgui_tables.cpp ${CXX} ${CXXFLAGS} -c ${IMGUI_DIR}/imgui_tables.cpp -o imgui_tables.o ${OUTPUT}: ${OBJS} ${CXX} ${LDFLAGS} ${OBJS} -std=c++11 -o ${OUTPUT} ${LIBS} ${WEBGL_VER} -O2 --preload-file data clean: rm -f ${OUTPUT} imgui.wasm ${OBJS} format: clang-format -i --style=WebKit main.cpp