Better makefile
This commit is contained in:
parent
f182582d7b
commit
3aff6375a8
13
Makefile
13
Makefile
@ -1,7 +1,18 @@
|
|||||||
# Compiler and other things
|
# Compiler and other things
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CFLAGS = -std=c99 -Wall -Wextra -Werror -O3 -flto
|
CFLAGS = -std=c99 -Wall -Wextra
|
||||||
BUILDD = build
|
BUILDD = build
|
||||||
|
ifdef MARCH # Allows you to define the architecture (usually not required)
|
||||||
|
CFLAGS += -march=$(MARCH)
|
||||||
|
endif
|
||||||
|
ifndef FORCE # Force the build to move past warnings (disable warnings as errors)
|
||||||
|
CFLAGS += -Werror
|
||||||
|
endif
|
||||||
|
ifdef DEBUG # Build in debug mode, usable in gdb/valgrind/etc
|
||||||
|
CFLAGS += -O2 -g
|
||||||
|
else
|
||||||
|
CFLAGS += -O3 -flto
|
||||||
|
endif
|
||||||
|
|
||||||
HALOOLIB = haloo3d/build/haloo3d_full.a
|
HALOOLIB = haloo3d/build/haloo3d_full.a
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user