common: update as_obj_binary macro

This commit is contained in:
Zack Buhman 2025-08-08 15:29:11 -05:00
parent 51dc1a5af4
commit 18273e9c25

View File

@ -30,7 +30,9 @@ define BUILD_BINARY_O
$< $@ $< $@
endef endef
as_obj_binary = _binary_$(subst .,_,$(subst /,_,$(basename $(1)))) makefile_path := $(dir $(abspath $(firstword $(MAKEFILE_LIST))))
makefile_relative = $(shell realpath --relative-to $(makefile_path) $(1))
as_obj_binary = _binary_$(subst -,_,$(subst .,_,$(subst /,_,$(subst .h,,$(call makefile_relative,$(1))))))
define BUILD_BINARY_H define BUILD_BINARY_H
@echo gen $@ @echo gen $@