From: Egor Date: Mon, 23 Oct 2023 10:08:34 +0000 (+0300) Subject: make USE_MAP_DYNARR configurable X-Git-Url: https://git.patchysicp.xyz/?a=commitdiff_plain;h=2488b465f7792056d58cd3d9315e9de1316cdbef;p=patchyircd.git make USE_MAP_DYNARR configurable --- 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