proj.mk: Support JWBDIR_NAME and JWBDIR_SEARCH_PATH

- Streamline proj.mk over all projects a little

  - Turn the string "jw-build" into a variable which can be overridden from the
    environment.

  - Add support for JWBDIR_SEARCH_PATH, also overridable from the environment.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2025-11-05 10:42:54 +01:00
commit bb247bff3d

View file

@ -1,10 +1,12 @@
# to be included from inside the project directory
DEV_PROJECTS_DIR ?= $(TOPDIR)/..
# To be included from inside the project directory
# -- Find JWBDIR
ifeq ($(TARGET),mingw)
FLAVOUR_PATH_PREFIX = win32/
endif
JWBDIR ?= $(firstword $(wildcard $(DEV_PROJECTS_DIR)/jw-build $(BUILD_TOOLS_PREFIX)/opt/$(FLAVOUR_PATH_PREFIX)jw-build))
DEV_PROJECTS_DIR ?= $(TOPDIR)/..
JWBDIR_NAME ?= jw-build
JWBDIR_SEARCH_PATH ?= $(DEV_PROJECTS_DIR) $(BUILD_TOOLS_PREFIX)/opt/$(FLAVOUR_PATH_PREFIX)
JWBDIR ?= $(firstword $(wildcard $(addsuffix /$(JWBDIR_NAME),$(JWBDIR_SEARCH_PATH))))
USE_PROJECT_LIB = false