This repository has been archived on 2022-01-16. You can view files and clone it, but cannot push or open issues or pull requests.
corelibs/config.mk

47 lines
587 B
Makefile
Raw Permalink Normal View History

# Defaults
2022-01-16 14:16:35 +00:00
CC := clang
DEBUG := 1
STATIC := 0
2022-01-16 14:16:35 +00:00
LDFLAGS :=
CFLAGS :=\
-std=c99 \
-Weverything \
-Wno-padded \
-Wno-disabled-macro-expansion \
-pedantic
# Sources / Results
2022-01-16 14:16:35 +00:00
SRC :=\
src/dynarray/dynarray.c \
src/llist/llist.c \
src/encoding/baseven/baseven.c \
src/types/error/error.c
2022-01-16 14:16:35 +00:00
LIBDIR :=
LIB :=\
c
2022-01-16 14:16:35 +00:00
INCDIR :=\
src/
2022-01-16 14:16:35 +00:00
OUT :=
# Conditionals / Appends
LDFLAGS +=\
2022-01-16 14:16:35 +00:00
$(addprefix -L,$(LIBDIR))\
$(addprefix -l,$(LIB))
CFLAGS +=\
2022-01-16 14:16:35 +00:00
$(addprefix -I,$(INCDIR))
2022-01-16 14:16:35 +00:00
ifeq ($(DEBUG),1)
CFLAGS += -g
else
CFLAGS += -O2 -Werror
endif
2022-01-16 14:16:35 +00:00
ifeq ($(STATIC),1)
LDFLAGS += -static
endif