-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (23 loc) · 937 Bytes
/
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
progname = Ryuutai
builddir = build
srcdir = src
libs = -Llib -lGL -lGLEW -lglfw -lpthread
#imguidir = ${srcdir}/external/imgui
cppflags = -std=c++11 -Iinclude
#cppflags += -I${imguidir} -I${imguidir}/backends -DIMGUI_IMPL_OPENGL_LOADER_GLEW
sourcefiles = ${srcdir}/*.cpp
#sourcefiles += ${imguidir}/imgui.cpp ${imguidir}/imgui_draw.cpp ${imguidir}/imgui_widgets.cpp
#sourcefiles += ${imguidir}/backends/imgui_impl_glfw.cpp ${imguidir}/backends/imgui_impl_opengl3.cpp
makebuilddir= if [ ! -e ${builddir} ];then mkdir ${builddir};fi
.PHONY: build debug clean
default: build
build:
${makebuilddir}
g++ -O2 ${cppflags} -o ${builddir}/${progname} ${sourcefiles} ${libs}
printf "\nTo run:\n\t./run.sh\n\n"
debug:
${makebuilddir}
g++ -g -fno-eliminate-unused-debug-symbols ${cppflags} -o ${builddir}/${progname}_debug ${sourcefiles} ${libs}
printf "\nTo debug :\n\tgdb ${builddir}/${progname}_debug\n\n"
clean:
rm build/*