-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
27 lines (23 loc) · 842 Bytes
/
makefile
File metadata and controls
27 lines (23 loc) · 842 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
OBJS = main.cpp \
asm.cpp \
Expr.cpp \
VarDecl.cpp \
Scope.cpp \
Parser.cpp \
Func.cpp \
Decl.cpp \
Labels.cpp \
Env.cpp \
Loc.cpp
CC = g++
COMPILER_WARNINGS = -Wall -Wnon-virtual-dtor -Wshadow -Winit-self -Wredundant-decls -Wcast-align -Wundef -Wfloat-equal -Winline -Wunreachable-code -Wmissing-declarations -Wmissing-include-dirs -Wmain -pedantic -Wzero-as-null-pointer-constant -Wextra
COMPILER_FLAGS = -std=c++1y
COMPILER_FLAGS_DEBUG = -g
COMPILER_FLAGS_RELEASE = -O3
OBJ_NAME = main
all:
$(CC) $(OBJS) $(INCLUDE_PATHS) $(COMPILER_WARNINGS) $(COMPILER_FLAGS) -o $(OBJ_NAME)
debug:
$(CC) $(OBJS) $(INCLUDE_PATHS) $(COMPILER_WARNINGS) $(COMPILER_FLAGS) $(COMPILER_FLAGS_DEBUG) -o $(OBJ_NAME)
release:
$(CC) $(OBJS) $(INCLUDE_PATHS) $(COMPILER_WARNINGS) $(COMPILER_FLAGS) $(COMPILER_FLAGS_RELEASE) -o $(OBJ_NAME)