-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
38 lines (29 loc) · 907 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
37
38
# Using MinGW (windows only)
# If you want to build on windows, install minGW and mesa dependencies
#GPP = /mnt/c/msys64/mingw64/bin/g++.exe
#LINK = -lglfw3 -lglew32 -lopengl32 -lgdi32 -limm32
#EXE = ./build/App.exe
#FLAGS = -g -w -I./include
#Linux
GPP = g++
LINK = -lglfw -lGLEW -lGL
EXE = ./build/App
FLAGS = -g -Wall -I./include
#-----------------------------------------------------
#--------Following should be changed carefully--------
SRC = ./main.cpp
SRC += $(wildcard ./include/IMGUI/imgui*.cpp)
OBJS = $(addprefix ./build/, $(addsuffix .o, $(basename $(notdir $(SRC)))))
#---------------------------Make rules ---------------
all: $(EXE)
@echo Build complete
$(EXE): $(OBJS)
$(GPP) -o $@ $^ $(FLAGS) $(LINK)
./build/main.o: main.cpp *.h
$(GPP) -c -o $@ $< $(FLAGS)
./build/%.o: ./include/IMGUI/%.cpp
$(GPP) -c -o $@ $< $(FLAGS)
debug :
@echo $(OBJS)
clean:
rm -f $(OBJS) $(EXE)