2023-11-24 17:37:22 +00:00
|
|
|
# Defaults
|
2023-12-30 08:15:15 +00:00
|
|
|
CC := gcc
|
2023-11-24 17:37:22 +00:00
|
|
|
DEBUG := 1
|
|
|
|
STATIC := 0
|
2023-12-30 08:15:15 +00:00
|
|
|
PLATFORM := linux
|
2023-11-24 17:37:22 +00:00
|
|
|
|
|
|
|
LDFLAGS :=
|
|
|
|
CFLAGS :=\
|
|
|
|
-std=c99 \
|
2023-12-30 08:15:15 +00:00
|
|
|
-Werror\
|
2023-11-24 17:37:22 +00:00
|
|
|
-Wno-padded \
|
|
|
|
-Wno-disabled-macro-expansion \
|
|
|
|
-pedantic
|
|
|
|
|
|
|
|
# Sources / Results
|
|
|
|
SRC :=\
|
2023-11-24 20:27:24 +00:00
|
|
|
src/rectangle.c \
|
2023-11-24 17:37:22 +00:00
|
|
|
src/init.c \
|
|
|
|
src/main.c
|
|
|
|
|
|
|
|
LIBDIR :=
|
|
|
|
LIB :=\
|
2023-12-30 08:15:15 +00:00
|
|
|
c\
|
|
|
|
SDL2main\
|
2023-11-24 17:37:22 +00:00
|
|
|
SDL2\
|
2023-12-30 18:53:54 +00:00
|
|
|
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
|