From 048d5716eae8c2e30a290ae0ee522a4bb505b51f Mon Sep 17 00:00:00 2001 From: topchetoeu <36534413+TopchetoEU@users.noreply.github.com> Date: Fri, 27 Jan 2023 14:03:14 +0200 Subject: [PATCH] fix: make include dependencies second-expanded --- scripts/common.mak | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/common.mak b/scripts/common.mak index e5f8973..0325296 100644 --- a/scripts/common.mak +++ b/scripts/common.mak @@ -53,7 +53,8 @@ $(bin)/lib$(lib)%$(so): $$(call frdeps,$$*) $$(call binaries,$$*) $(CXX) -shared -fPIC $(flags) $(call binaries,$*) -o $@ $(ldflags) $(call ldeps,$*) -L$(bin) "-I$(inc)" echo Compiling library '$(notdir $@)'... -$(bin)/tmp/%.o: $(src)/%.cc $(shell $(lsinc) $(inc) $(src)/%.cc) +.SECONDEXPANSION: +$(bin)/tmp/%.o: $(src)/%.cc $$(shell $(lsinc) $(inc) $(src)/%.cc) $(call mkdir,$(dir $@)) $(CXX) -fPIC -c $(flags) $< -o $@ echo - Compiling '$*.cc'...