diff options
Diffstat (limited to 'zap/GNUmakefile')
-rw-r--r-- | zap/GNUmakefile | 64 |
1 files changed, 43 insertions, 21 deletions
diff --git a/zap/GNUmakefile b/zap/GNUmakefile index 2814f55..8b38661 100644 --- a/zap/GNUmakefile +++ b/zap/GNUmakefile @@ -10,27 +10,36 @@ endif $(info Detected architecture $(arch) !) endif +ifeq "$(stdc)" "" +stdc := c99 +endif + +ifeq "$(stdcxx)" "" +stdcxx := c++14 +endif + OBJ_BS_TRAP := source/any/bs/trap.o OBJ_MATH_ABS := source/any/math/abs.o -OBJ_MATH_DIV0 := source/any/math/div0.o OBJ_MATH_DIVMOD := source/any/math/divmod.o OBJ_MATH_EXP := source/any/math/exp.o OBJ_MEM_CP := source/any/mem/cp.o OBJ_MEM_EQ := source/any/mem/eq.o OBJ_MEM_FILL := source/any/mem/fill.o OBJ_MEM_SRCH := source/any/mem/srch.o -OBJ_MEM_STREQ := source/any/mem/streq.o -OBJ_MEM_STRLEN := source/any/mem/strlen.o -OBJ_MEM_UTF8DEC := source/any/mem/utf8dec.o -OBJ_MEM_UTF8DECLEN := source/any/mem/utf8declen.o -OBJ_MEM_UTF8ENC := source/any/mem/utf8enc.o -OBJ_MEM_UTF8ENCLEN := source/any/mem/utf8enclen.o -OBJ_MEM_WIN1252DEC := source/any/mem/win1252dec.o -OBJ_MEM_WIN1252ENC := source/any/mem/win1252enc.o +OBJ_STR_FMT := source/any/str/fmt.o +OBJ_STR_FMTLEN := source/any/str/fmtlen.o +OBJ_STR_STREQ := source/any/str/streq.o +OBJ_STR_STRLEN := source/any/str/strlen.o +OBJ_STR_UTF8DEC := source/any/str/utf8dec.o +OBJ_STR_UTF8DECLEN := source/any/str/utf8declen.o +OBJ_STR_UTF8ENC := source/any/str/utf8enc.o +OBJ_STR_UTF8ENCLEN := source/any/str/utf8enclen.o +OBJ_STR_WIN1252DEC := source/any/str/win1252dec.o +OBJ_STR_WIN1252ENC := source/any/str/win1252enc.o ifeq "$(arch)" "amd64" OBJ_BS_TRAP := source/$(arch)/bs/trap.o -OBJ_MATH_ABS := source/$(arch)/math/abs.o +#OBJ_MATH_ABS := source/$(arch)/math/abs.o OBJ_MEM_CP := source/$(arch)/mem/cp.o OBJ_MEM_FILL := source/$(arch)/mem/fill.o else ifeq "$(arch)" "arm64" @@ -41,21 +50,22 @@ endif OBJS := \ $(OBJ_BS_TRAP) \ $(OBJ_MATH_ABS) \ - $(OBJ_MATH_DIV0) \ $(OBJ_MATH_DIVMOD) \ $(OBJ_MATH_EXP) \ $(OBJ_MEM_CP) \ $(OBJ_MEM_EQ) \ $(OBJ_MEM_FILL) \ $(OBJ_MEM_SRCH) \ - $(OBJ_MEM_STREQ) \ - $(OBJ_MEM_STRLEN) \ - $(OBJ_MEM_UTF8DEC) \ - $(OBJ_MEM_UTF8DECLEN) \ - $(OBJ_MEM_UTF8ENC) \ - $(OBJ_MEM_UTF8ENCLEN) \ - $(OBJ_MEM_WIN1252DEC) \ - $(OBJ_MEM_WIN1252ENC) + $(OBJ_STR_FMT) \ + $(OBJ_STR_FMTLEN) \ + $(OBJ_STR_STREQ) \ + $(OBJ_STR_STRLEN) \ + $(OBJ_STR_UTF8DEC) \ + $(OBJ_STR_UTF8DECLEN) \ + $(OBJ_STR_UTF8ENC) \ + $(OBJ_STR_UTF8ENCLEN) \ + $(OBJ_STR_WIN1252DEC) \ + $(OBJ_STR_WIN1252ENC) LIB := libzap.a @@ -69,13 +79,25 @@ CFLAGS := \ -Oz \ -Wall \ -Wextra \ - -Wpadded \ -Wpedantic \ -ffreestanding \ -fshort-enums \ -nostdlib \ -pipe \ - -std=c99 + -std=$(stdc) + +CXXFLAGS := \ + -Iinclude \ + -Oz \ + -Wall \ + -Wextra \ + -Wpedantic \ + -ffreestanding \ + -fno-exceptions \ + -fshort-enums \ + -nostdlib \ + -pipe \ + -std=$(stdcxx) .PHONY: clean install purge |