-
Notifications
You must be signed in to change notification settings - Fork 1
/
compile_newtons_cradle.sh
28 lines (22 loc) · 1.44 KB
/
compile_newtons_cradle.sh
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
# Download ImGui and paste the files imgui_demo.cpp, imgui_draw.cpp, imgui_impl_glfw.cpp, imgui_impl_opengl3.cpp, imgui_tables.cpp, imgui_widgets.cpp
# into the vender/imgui folder.
# Make sure you have Assimp, GLEW, GLFW, and GLM installed in the global /usr/include/ folder.
# Then run this script.
BUILD_DIR="./build"
IMGUI_DIR="./vendor/imgui"
CXXFLAGS="-g -Wall -Wformat"
LDLIBS="-lglfw -lGLEW -lGL -lX11 -lpthread -lXrandr -lXi -ldl -lassimp"
mkdir -p $BUILD_DIR
# IMPORTANT #
# g++ $CXXFLAGS -c -o $BUILD_DIR/imgui.o $IMGUI_DIR/imgui.cpp
# g++ $CXXFLAGS -c -o $BUILD_DIR/imgui_demo.o $IMGUI_DIR/imgui_demo.cpp
# g++ $CXXFLAGS -c -o $BUILD_DIR/imgui_draw.o $IMGUI_DIR/imgui_draw.cpp
# g++ $CXXFLAGS -c -o $BUILD_DIR/imgui_impl_glfw.o $IMGUI_DIR/imgui_impl_glfw.cpp
# g++ $CXXFLAGS -c -o $BUILD_DIR/imgui_impl_opengl3.o $IMGUI_DIR/imgui_impl_opengl3.cpp
# g++ $CXXFLAGS -c -o $BUILD_DIR/imgui_tables.o $IMGUI_DIR/imgui_tables.cpp
# g++ $CXXFLAGS -c -o $BUILD_DIR/imgui_widgets.o $IMGUI_DIR/imgui_widgets.cpp
# echo ">> Finished compiling ImGui."
g++ $CXXFLAGS -c -o $BUILD_DIR/newtons_cradle.o newtons_cradle.cpp
echo ">> Finished compiling main."
g++ $CXXFLAGS -o myNewtonsCradle $BUILD_DIR/newtons_cradle.o $BUILD_DIR/imgui.o $BUILD_DIR/imgui_demo.o $BUILD_DIR/imgui_draw.o $BUILD_DIR/imgui_impl_glfw.o $BUILD_DIR/imgui_impl_opengl3.o $BUILD_DIR/imgui_tables.o $BUILD_DIR/imgui_widgets.o $LDLIBS
echo ">> Finished compiling, linking, and building myBlender."