funni-square/config.mk

50 lines
593 B
Makefile
Raw Normal View History

2023-11-24 17:37:22 +00:00
# Defaults
CC := gcc
2023-11-24 17:37:22 +00:00
DEBUG := 1
STATIC := 0
PLATFORM := linux
2023-11-24 17:37:22 +00:00
LDFLAGS :=
CFLAGS :=\
-std=c99 \
-Werror\
2023-11-24 17:37:22 +00:00
-Wno-padded \
-Wno-disabled-macro-expansion \
-pedantic
# Sources / Results
SRC :=\
src/rectangle.c \
2023-11-24 17:37:22 +00:00
src/init.c \
src/main.c
LIBDIR :=
LIB :=\
c\
SDL2main\
2023-11-24 17:37:22 +00:00
SDL2\
SDL2_ttf
2023-11-24 17:37:22 +00:00
INCDIR :=\
src/
OUT := project
# Conditionals / Appends
LDFLAGS +=\
$(addprefix -L,${LIBDIR})\
$(addprefix -l,${LIB})
CFLAGS +=\
$(addprefix -I,${INCDIR})
ifeq (${DEBUG},1)
CFLAGS += -g
else
CFLAGS += -O2 -Werror
endif
ifeq (${STATIC},1)
LDFLAGS += -static
endif