-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
33 lines (22 loc) · 701 Bytes
/
makefile
File metadata and controls
33 lines (22 loc) · 701 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
CC=g++
STD=-std=c++11
LIBS=-lGLEW -lglfw -lGLU -lGL -lfreeimage
ERRORFLAGS=-Wall -Wextra -Wparentheses -Wfloat-equal -Wshadow -Wmissing-field-initializers -Wmissing-declarations -Winline
PEDANTIC=-pedantic
FLAGS=$(ERRORFLAGS) $(PEDANTIC)
SRCFILES=src/*.cpp
SRCDIR=src
OUTDIR=bin
OUTFILE=main
default: setup release
setup:
mkdir -p $(OUTDIR)
normal:
$(CC) $(STD) $(FLAGS) $(LIBS) $(SRCFILES) -o $(OUTDIR)/normal
debug:
$(CC) -g3 $(STD) $(FLAGS) $(LIBS) $(SRCFILES) -o $(OUTDIR)/debug
release-debug:
$(CC) -O3 -g3 $(STD) $(FLAGS) $(LIBS) $(SRCFILES) -o $(OUTDIR)/release-debug
release:
$(CC) -O3 $(STD) $(FLAGS) $(LIBS) $(SRCFILES) -o $(OUTDIR)/release
all: debug release-debug release