3 ifndef PDCLIB_PLATFORM_EXT
\r
7 $(error malloc to use unspecified. Set PDCLIB_MALLOC.)
\r
10 ifeq ($(PDCLIB_MALLOC),solar)
\r
11 pdclib_SOURCEDIRS += opt/malloc-solar
\r
13 ifeq ($(PDCLIB_MALLOC),dlmalloc)
\r
14 pdclib_SOURCEDIRS += opt/dlmalloc
\r
16 $(error Bad malloc specified. Supported: solar, ptmalloc3)
\r
20 # No: -Wcast-align; spurious for uses of char* to do pointer arithmetic
\r
21 # No: -Winline; generates spirous errors on -Os builds
\r
22 # No: -Wredundant-decls; redefinition of functions is legal and sometimes required
\r
23 # (especially applicable to PDCLib sources)
\r
24 # -Wno-unused-parameter; unused parameters are common in some interfaces
\r
25 WARNINGS := -Wall -Wextra -pedantic -Wshadow -Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wno-long-long -Wuninitialized -Wstrict-prototypes -Wno-unused-parameter
\r
27 pdclib_COMFLAGS += -ffreestanding $(WARNINGS)
\r
28 pdclib_CFLAGS += -std=c11
\r
29 pdclib_SOURCEDIRS += functions/_PDCLIB functions/ctype functions/inttypes \
\r
30 functions/locale functions/stdio functions/stdlib \
\r
32 pdclib_OUT_TYPE += archive
\r
33 pdclib_INCLUDE_DIRS += $(pdclib_SOURCE_DIR)/includes $(pdclib_SOURCE_DIR)/internals
\r
35 ifdef PDCLIB_OPT_NOTHREAD
\r
36 pdclib_SOURCEDIRS += opt/nothread
\r
37 pdclib_INCLUDE_DIRS += $(pdclib_SOURCE_DIR)/opt/nothread
\r
40 ifdef PDCLIB_OPT_NOTIME
\r
41 pdclib_SOURCEDIRS += opt/notime
\r