-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (28 loc) · 980 Bytes
/
Makefile
File metadata and controls
37 lines (28 loc) · 980 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
CPP = g++ -std=c++11 -Wall --pedantic
INCDIR = -I./ -I./util -I./modules/build/include
LIBDIR = -L./ -L./modules/build/lib
BINDIR = ./bin
OBJDIR = $(BINDIR)/obj
LIBS = -lglad -lGL -lEGL -lXrandr -lXext -lX11 -lrt -ldl -lglut -pthread
CFLAGS = $(INCDIR) $(LIBDIR)
MKDIR = mkdir -p
all: setup main.out
main.out: util.o
@$(CPP) $(CFLAGS) main.cpp -o $(BINDIR)/main.out $(OBJDIR)/*.o $(LIBS)
# The following line is an example on how to compile your own clases. Use
# the $(OBJDIR) directory to output your object files:
#
# example_class.o:
# @$(CPP) $(CFLAGS) -c example_class.cpp \
# -o $(OBJDIR)/example_class.o
#
# Do not forget to specify example_class.o alongside the main.out label. This
# way, we tell make that main.out depends on example_class.o, triggering the
# build beforehand.
util.o:
@$(CPP) $(CFLAGS) -c util/util.cpp -o $(OBJDIR)/util.o
setup:
@$(MKDIR) $(BINDIR) $(OBJDIR)
clean:
@$(RM) -rf $(BINDIR) $(OBJDIR)
rebuild: clean all