From 2488b465f7792056d58cd3d9315e9de1316cdbef Mon Sep 17 00:00:00 2001 From: Egor Date: Mon, 23 Oct 2023 13:08:34 +0300 Subject: [PATCH] make USE_MAP_DYNARR configurable --- Makefile | 10 +++++++--- config.example.mk | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index fb4bd7a..ad27027 100644 --- a/Makefile +++ b/Makefile @@ -22,10 +22,14 @@ HEADERS := \ -include config.mk +ifndef USE_MAP_DYNARR SOURCES += src/map_trie.c -#SOURCES += src/map_dynarr.c -#CFLAGS += -DUSE_MAP_DYNARR -#CFLAGS.w32 += -DUSE_MAP_DYNARR +else +SOURCES += src/map_dynarr.c +CFLAGS += -DUSE_MAP_DYNARR +CFLAGS.w32 += -DUSE_MAP_DYNARR +endif + .PHONY: all clean all: $(TARGET) $(if $(CC.w32),$(TARGET).exe,) setpass clean: diff --git a/config.example.mk b/config.example.mk index 3a75b9b..a19c626 100644 --- a/config.example.mk +++ b/config.example.mk @@ -5,3 +5,4 @@ LDLIBS=-ltls CC.w32=i686-w64-mingw32-gcc CFLAGS.w32=-Wall -Wextra -DNETPOLL_USE_SELECT LDLIBS.w32=-lws2_32 +USE_MAP_DYNARR=1 -- 2.56.0