]> pd.if.org Git - pdclib/blob - CoreMakefile.mk
* Change the style of inclusion of the internal/ headers. Modern preprocessors
[pdclib] / CoreMakefile.mk
1 TARGETS = pdclib\r
2 \r
3 ifndef PDCLIB_PLATFORM_EXT\r
4 endif\r
5 \r
6 ifndef PDCLIB_MALLOC\r
7     $(error malloc to use unspecified. Set PDCLIB_MALLOC.)\r
8 endif\r
9 \r
10 ifeq ($(PDCLIB_MALLOC),solar)\r
11     pdclib_SOURCEDIRS += opt/malloc-solar\r
12 else\r
13 ifeq ($(PDCLIB_MALLOC),ptmalloc3)\r
14     pdclib_SOURCEDIRS += opt/ptmalloc3\r
15 else\r
16     $(error Bad malloc specified. Supported: solar, ptmalloc3)\r
17 endif\r
18 endif\r
19 \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 WARNINGS := -Wall -Wextra -pedantic -Wno-unused-parameter -Wshadow -Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wno-long-long -Wuninitialized -Wstrict-prototypes\r
23 \r
24 pdclib_COMFLAGS += -ffreestanding $(WARNINGS)\r
25 pdclib_CFLAGS   += -std=c11\r
26 pdclib_SOURCEDIRS       +=      functions/_PDCLIB functions/ctype functions/inttypes  \\r
27                                                 functions/locale functions/stdio functions/stdlib         \\r
28                                                 functions/string/\r
29 pdclib_OUT_TYPE         += archive\r
30 pdclib_INCLUDE_DIRS     += $(pdclib_SOURCE_DIR)/includes $(pdclib_SOURCE_DIR)/internals\r
31 \r
32 ifdef PDCLIB_OPT_NOTHREAD\r
33         pdclib_SOURCEDIRS   += opt/nothread\r
34         pdclib_INCLUDE_DIRS += $(pdclib_SOURCE_DIR)/opt/nothread\r
35 endif