@@ -80,7 +80,8 @@ BUILD_REF ?= $(shell git describe --abbrev=0 2>/dev/null)
8080# go source files
8181SRC = $(shell find . -type f -name '* .go')
8282
83- # Tokenizer & Linking
83+ # DEPRECATED: Tokenizer & Linking flags (only used for legacy embedded tokenizer builds)
84+ # UDS builds don't need these flags - ZMQ linking is handled automatically via pkg-config
8485LDFLAGS ?= -extldflags '-L$(LOCALLIB ) '
8586CGO_ENABLED =1
8687
@@ -111,7 +112,8 @@ endif
111112PYTHON_CFLAGS := $(shell $(PYTHON_CONFIG ) --cflags)
112113PYTHON_LDFLAGS := $(shell $(PYTHON_CONFIG ) --ldflags --embed)
113114
114- # CGO flags with all dependencies
115+ # DEPRECATED: CGO flags with Python and tokenizers (only used for legacy embedded tokenizer builds)
116+ # The default UDS build only needs ZMQ
115117CGO_CFLAGS := $(PYTHON_CFLAGS ) '-I$(shell pwd) /lib'
116118CGO_LDFLAGS := $(PYTHON_LDFLAGS ) $(PYTHON_LIBS ) '-L$(shell pwd) /lib' -ltokenizers -ldl -lm
117119
@@ -121,11 +123,12 @@ epp_IMAGE = $(EPP_IMAGE)
121123sidecar_IMAGE = $(SIDECAR_IMAGE )
122124epp_NAME = epp
123125sidecar_NAME = $(SIDECAR_NAME )
124- epp_LDFLAGS = -ldflags="$(LDFLAGS ) "
126+ # Empty flags for UDS-only builds (ZMQ linking handled via pkg-config)
127+ epp_LDFLAGS =
125128sidecar_LDFLAGS =
126- epp_CGO_CFLAGS = "${CGO_CFLAGS}"
129+ epp_CGO_CFLAGS =
127130sidecar_CGO_CFLAGS =
128- epp_CGO_LDFLAGS = "${CGO_LDFLAGS}"
131+ epp_CGO_LDFLAGS =
129132sidecar_CGO_LDFLAGS =
130133epp_TEST_FILES = go list ./... | grep -v /test/ | grep -v ./pkg/sidecar/
131134sidecar_TEST_FILES = go list ./pkg/sidecar/...
@@ -171,14 +174,14 @@ test: test-unit test-e2e ## Run all tests (unit and e2e)
171174test-unit : test-unit-epp test-unit-sidecar # # Run unit tests
172175
173176.PHONY : test-unit-%
174- test-unit-% : download-tokenizer install-python-deps check-dependencies # # Run unit tests
177+ test-unit-% : check-dependencies # # Run unit tests
175178 @printf " \033[33;1m==== Running Unit Tests ====\033[0m\n"
176179 @KV_CACHE_PKG=$$(go list -m -f '{{.Dir}}/pkg/preprocessing/chat_completions' github.com/llm-d/llm-d-kv-cache 2>/dev/null || echo "" ) ; \
177180 PYTHONPATH=" $$ KV_CACHE_PKG:$( VENV_DIR) /lib/python$( PYTHON_VERSION) /site-packages" \
178181 CGO_CFLAGS=${$* _CGO_CFLAGS} CGO_LDFLAGS=${$* _CGO_LDFLAGS} go test $($* _LDFLAGS) -v $$($($* _TEST_FILES) | tr '\n' ' ')
179182
180183.PHONY : test-filter
181- test-filter : download-tokenizer install-python-deps check-dependencies # # Run filtered unit tests (usage: make test-filter PATTERN=TestName TYPE=epp)
184+ test-filter : check-dependencies # # Run filtered unit tests (usage: make test-filter PATTERN=TestName TYPE=epp)
182185 @if [ -z " $( PATTERN) " ]; then \
183186 echo " ERROR: PATTERN is required. Usage: make test-filter PATTERN=TestName [TYPE=epp|sidecar]" ; \
184187 exit 1; \
@@ -197,7 +200,7 @@ test-filter: download-tokenizer install-python-deps check-dependencies ## Run fi
197200 fi
198201
199202.PHONY : test-integration
200- test-integration : download-tokenizer check-dependencies # # Run integration tests
203+ test-integration : check-dependencies # # Run integration tests
201204 @printf " \033[33;1m==== Running Integration Tests ====\033[0m\n"
202205 go test -ldflags=" $( LDFLAGS) " -v -tags=integration_tests ./test/integration/
203206
@@ -218,7 +221,7 @@ post-deploy-test: ## Run post deployment tests
218221build : build-epp build-sidecar # # Build the project for both epp and sidecar
219222
220223.PHONY : build-%
221- build-% : check-go download-tokenizer # # Build the project
224+ build-% : check-go # # Build the project
222225 @printf " \033[33;1m==== Building ====\033[0m\n"
223226 CGO_CFLAGS=${$* _CGO_CFLAGS} CGO_LDFLAGS=${$* _CGO_LDFLAGS} go build $($* _LDFLAGS) -o bin/$($* _NAME) cmd/$($* _NAME) /main.go
224227
0 commit comments