47 lines
577 B
Makefile
47 lines
577 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/dynarray/dynarray.c \
|
||
|
src/llist/llist.c \
|
||
|
src/encoding/baseven/baseven.c \
|
||
|
src/types/error/error.c
|
||
|
|
||
|
LIBDIR =
|
||
|
LIB =\
|
||
|
c
|
||
|
|
||
|
INCDIR =\
|
||
|
src/
|
||
|
|
||
|
OUT =
|
||
|
|
||
|
# 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
|