Add conditional compilation of controller.

This commit is contained in:
Adam Ierymenko 2025-08-21 09:55:08 -04:00
parent 6bf7b4d9ba
commit 6e6fc9a704
No known key found for this signature in database
GPG key ID: C8877CF2D7A5D7F3
10 changed files with 65 additions and 60 deletions

View file

@ -16,6 +16,16 @@ DESTDIR?=
EXTRA_DEPS?=
include objects.mk
ifeq ($(ZT_CONTROLLER),1)
ZT_NONFREE=1
endif
ifeq ($(ZT_NONFREE),1)
include objects-nonfree.mk
ONE_OBJS+=$(CONTROLLER_OBJS)
override DEFS += -DZT_NONFREE_CONTROLLER
endif
ifeq ($(ZT_EXTOSDEP),1)
ONE_OBJS+=osdep/ExtOsdep.o
override DEFS += -DZT_EXTOSDEP
@ -56,7 +66,7 @@ ifeq ($(ZT_RULES_ENGINE_DEBUGGING),1)
endif
ifeq ($(ZT_DEBUG_TRACE),1)
DEFS+=-DZT_DEBUG_TRACE
override DEFS+=-DZT_DEBUG_TRACE
endif
# Build with address sanitization library for advanced debugging (clang)
@ -94,10 +104,6 @@ ifeq ($(ZT_SYNOLOGY), 1)
ZT_EMBEDDED=1
endif
ifeq ($(ZT_DISABLE_COMPRESSION), 1)
override DEFS+=-DZT_DISABLE_COMPRESSION
endif
ifeq ($(ZT_TRACE),1)
override DEFS+=-DZT_TRACE
endif
@ -115,7 +121,7 @@ ifeq ($(ZT_VAULT_SUPPORT),1)
override LDLIBS+=-lcurl
endif
# Determine system build architecture from compiler target
# Determine system build architecture from compiler target. This is hairy due to "ARM wrestling."
CC_MACH=$(shell $(CC) -dumpmachine | cut -d '-' -f 1)
ZT_ARCHITECTURE=999
ifeq ($(CC_MACH),x86_64)