X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=CoreMakefile.mk;fp=CoreMakefile.mk;h=ac7d49573a15eaec7d918dbd5e7446ac12503ebc;hb=97dd2fddbdb56005b16a1b0aa19ed15cd77269fc;hp=0000000000000000000000000000000000000000;hpb=263e1e1fae0dcae08d99dc06fd69391ad076f378;p=pdclib.old diff --git a/CoreMakefile.mk b/CoreMakefile.mk new file mode 100644 index 0000000..ac7d495 --- /dev/null +++ b/CoreMakefile.mk @@ -0,0 +1,35 @@ +TARGETS = pdclib + +ifndef PDCLIB_PLATFORM_EXT +endif + +ifndef PDCLIB_MALLOC + $(error malloc to use unspecified. Set PDCLIB_MALLOC.) +endif + +ifeq ($(PDCLIB_MALLOC),solar) + pdclib_SOURCEDIRS += opt/malloc-solar +else +ifeq ($(PDCLIB_MALLOC),ptmalloc3) + pdclib_SOURCEDIRS += opt/ptmalloc3 +else + $(error Bad malloc specified. Supported: solar, ptmalloc3) +endif +endif + +# No: -Wcast-align; spurious for uses of char* to do pointer arithmetic +# No: -Winline; generates spirous errors on -Os builds +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 + +pdclib_COMFLAGS += -ffreestanding $(WARNINGS) +pdclib_CFLAGS += -std=c11 +pdclib_SOURCEDIRS += functions/_PDCLIB functions/ctype functions/inttypes \ + functions/locale functions/stdio functions/stdlib \ + functions/string/ +pdclib_OUT_TYPE += archive +pdclib_INCLUDE_DIRS += $(pdclib_SOURCE_DIR)/includes $(pdclib_SOURCE_DIR)/internals + +ifdef PDCLIB_OPT_NOTHREAD + pdclib_SOURCEDIRS += opt/nothread + pdclib_INCLUDE_DIRS += $(pdclib_SOURCE_DIR)/opt/nothread +endif \ No newline at end of file