diff options
author | Test_User <hax@andrewyu.org> | 2024-07-24 23:48:25 -0400 |
---|---|---|
committer | Test_User <hax@andrewyu.org> | 2024-07-24 23:48:25 -0400 |
commit | d4afb359bc2a41c16cc8ce7baac58a5fad94c468 (patch) | |
tree | 71da9038c6721ba351b33cb6098b6d310b961050 /Makefile | |
parent | 86344230a6bb79b95880769fbee4d859583c9ac4 (diff) | |
download | haxircd-d4afb359bc2a41c16cc8ce7baac58a5fad94c468.tar.gz haxircd-d4afb359bc2a41c16cc8ce7baac58a5fad94c468.zip |
Toggleable IPv4 support
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -54,6 +54,7 @@ LDFLAGS = -lpthread printf '%s\n' 'LAST_FUTEX = $(FUTEX)' >> .makeopts printf '%s\n' 'LAST_MISERABLE_SPINLOCKS = $(MISERABLE_SPINLOCKS)' >> .makeopts printf '%s\n' 'LAST_ATOMICS = $(ATOMICS)' >> .makeopts + printf '%s\n' 'LAST_IPv4 = $(IPv4)' >> .makeopts printf '%s\n' 'LAST_IPv6 = $(IPv6)' >> .makeopts printf '%s\n' 'LAST_CFLAGS = $(ORIGINAL_CFLAGS)' >> .makeopts printf '%s\n' 'LAST_CC = $(CC)' >> .makeopts @@ -250,6 +251,14 @@ else ATOMICS := $(LAST_ATOMICS) endif +ifneq ($(IPv4),) +ifneq ($(IPv4),$(LAST_IPv4)) +rebuild = 1 +endif +else +IPv4 := $(LAST_IPv4) +endif + ifneq ($(IPv6),) ifneq ($(IPv6),$(LAST_IPv6)) rebuild = 1 @@ -460,8 +469,20 @@ endif +IP_ENABLED := 0 + +ifeq ($(IPv4),1) +CFLAGS += -DUSE_IPv4 +IP_ENABLED := 1 +endif + ifeq ($(IPv6),1) CFLAGS += -DUSE_IPv6 +IP_ENABLED := 1 +endif + +ifneq ($(IP_ENABLED),1) +$(error I don't know how you intend to use TCP/IP without IP) endif |