-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
36 lines (28 loc) · 833 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
35
36
COMPILER := g++
STD := c++20
FLAGS := -ggdb -Wall -Weffc++ -Wextra -Werror
INCLUDE := -Iinclude/ -Iimgui/ -Iimgui/backends -Izep/include
LIB := -Llib/
LIBS := -lglfw3dll -lopengl32
SRC := comp/*.o src/*.cpp $(wildcard src/gui/*.cpp) src/OpenGL/**/*.cpp
# src/imgui/*.cpp
test: compile run clean
build: compile run
compile:
@-mkdir out
-$(COMPILER) -g --std=$(STD) $(INCLUDE) $(LIB) $(SRC) $(LIBS) -o out/main
comp_libs:
@-mkdir comp
-$(COMPILER) -c --std=$(STD) $(INCLUDE) $(LIB) src/glad.c src/imgui/**/*.cpp src/imgui/*.cpp $(LIBS)
-$(COMPILER) -c --std=$(STD) $(INCLUDE) $(LIB) imgui/*.cpp imgui/backends/imgui_impl_glfw.cpp imgui/backends/imgui_impl_opengl3.cpp $(LIBS)
mv *.o comp/
run:
@echo ""
./out/main $(args)
clean:
@echo ""
rm -f out/*.o out/*.exe
clean_all:
@echo ""
rm -rd out
rm -rd comp