-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (30 loc) · 862 Bytes
/
Makefile
File metadata and controls
40 lines (30 loc) · 862 Bytes
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
35
36
37
38
39
40
# -----------------------------
# Makefile for Mini Engine
# -----------------------------
SRC_DIR = mini_engine/src
IMGUI_DIR = mini_engine/imgui
CXX = g++
CXXFLAGS = -std=c++17 -Wall -Wextra -O2 \
-I$(SRC_DIR) \
-I$(IMGUI_DIR) \
-I$(IMGUI_DIR)/backends
LIBS = -lglfw -lGLEW -lGL -ldl -lpthread -lm
# ImGui source files
IMGUI_SRC = \
$(IMGUI_DIR)/imgui.cpp \
$(IMGUI_DIR)/imgui_draw.cpp \
$(IMGUI_DIR)/imgui_widgets.cpp \
$(IMGUI_DIR)/imgui_tables.cpp \
$(IMGUI_DIR)/imgui_demo.cpp \
$(IMGUI_DIR)/backends/imgui_impl_glfw.cpp \
$(IMGUI_DIR)/backends/imgui_impl_opengl3.cpp
# Your engine sources
ENGINE_SRC = $(wildcard $(SRC_DIR)/*.cpp)
OUT = mini_engine/build/main.out
all: $(OUT)
$(OUT): $(ENGINE_SRC) $(IMGUI_SRC)
$(CXX) $(CXXFLAGS) $^ -o $@ $(LIBS)
run:
./$(OUT)
clean:
rm -f $(OUT)