Allow using the DISABLE_* flags when building specific subsets of the lib target

This commit is contained in:
Lior Halphon 2025-07-22 23:31:38 +03:00
parent eb38034b76
commit c40221abb6
1 changed files with 6 additions and 7 deletions

View File

@ -100,15 +100,8 @@ else
CPPP_FLAGS += -UGB_DISABLE_CHEAT_SEARCH
endif
ifneq ($(CORE_FILTER)$(DISABLE_TIMEKEEPING),)
ifneq ($(MAKECMDGOALS),lib)
$(error SameBoy features can only be disabled when compiling the 'lib' target)
endif
endif
CPPP_FLAGS += -UGB_INTERNAL
include version.mk
COPYRIGHT_YEAR := $(shell grep -oE "20[2-9][0-9]" LICENSE)
export VERSION
@ -121,6 +114,12 @@ LIBDIR := build/lib
PKGCONF_DIR := $(LIBDIR)/pkgconfig
PKGCONF_FILE := $(PKGCONF_DIR)/sameboy.pc
ifneq ($(CORE_FILTER)$(DISABLE_TIMEKEEPING),)
ifneq ($(filter-out lib $(LIBDIR)/% $(INC)/%,$(MAKECMDGOALS)),)
$(error SameBoy features can only be disabled when compiling the 'lib' target)
endif
endif
BOOTROMS_DIR ?= $(BIN)/BootROMs
ifdef DATA_DIR