mirror of
https://github.com/Ty3r0X/funni-square.git
synced 2025-01-18 13:11:52 +00:00
46 lines
529 B
Makefile
46 lines
529 B
Makefile
|
# Defaults
|
||
|
CC := clang
|
||
|
DEBUG := 1
|
||
|
STATIC := 0
|
||
|
|
||
|
LDFLAGS :=
|
||
|
CFLAGS :=\
|
||
|
-std=c99 \
|
||
|
-Weverything \
|
||
|
-Wno-padded \
|
||
|
-Wno-disabled-macro-expansion \
|
||
|
-pedantic
|
||
|
|
||
|
# Sources / Results
|
||
|
SRC :=\
|
||
|
src/init.c \
|
||
|
src/main.c
|
||
|
|
||
|
LIBDIR :=
|
||
|
LIB :=\
|
||
|
c\
|
||
|
SDL2\
|
||
|
|
||
|
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
|