Better makefile

This commit is contained in:
Carlos Sanchez 2024-08-15 03:58:22 -04:00
parent f182582d7b
commit 3aff6375a8

View File

@ -1,7 +1,18 @@
# Compiler and other things
CC = gcc
CFLAGS = -std=c99 -Wall -Wextra -Werror -O3 -flto
CFLAGS = -std=c99 -Wall -Wextra
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