-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (24 loc) · 1018 Bytes
/
Copy pathMakefile
File metadata and controls
30 lines (24 loc) · 1018 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
CC = g++
CXXFLAGS = -g -Wall
LIBS = -lglfw -lGL -lGLU -lglut -lXmu -lm -ldl
IMGUI_DIR = ./include/imgui
GLAD_DIR = ./include/glad
OBJ_DIR = ./obj
INCLUDE = -I$(GLAD_DIR) -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends
OBJS = ./obj/*.o
all: clean imgui glad
imgui:
$(CC) -c $(IMGUI_DIR)/imgui.cpp $(INCLUDE) -o $(OBJ_DIR)/imgui.o
$(CC) -c $(IMGUI_DIR)/imgui_draw.cpp $(INCLUDE) -o $(OBJ_DIR)/imgui_draw.o
$(CC) -c $(IMGUI_DIR)/imgui_tables.cpp $(INCLUDE) -o $(OBJ_DIR)/imgui_tables.o
$(CC) -c $(IMGUI_DIR)/imgui_demo.cpp $(INCLUDE) -o $(OBJ_DIR)/imgui_demo.o
$(CC) -c $(IMGUI_DIR)/imgui_widgets.cpp $(INCLUDE) -o $(OBJ_DIR)/imgui_widgets.o
$(CC) -c $(IMGUI_DIR)/backends/imgui_impl_glfw.cpp $(INCLUDE) -o $(OBJ_DIR)/imgui_impl_glfw.o
$(CC) -c $(IMGUI_DIR)/backends/imgui_impl_opengl3.cpp $(INCLUDE) -o $(OBJ_DIR)/imgui_impl_opengl3.o
glad:
$(CC) -c $(GLAD_DIR)/glad.c $(INCLUDE) -o ./obj/glad.o
%.cpp:
$(CC) $(CXXFLAGS) src/$@ $(OBJS) $(INCLUDE) $(LIBS) -o $(subst .cpp,.out,$@)
clean:
rm -f obj/*.o
rm -f *.out