diff --git a/Makefile b/Makefile index c75df1cf..e0cef2f1 100644 --- a/Makefile +++ b/Makefile @@ -327,12 +327,12 @@ endif @$(check_echo) " [SP] $<" $(Q)$(check) $(CFLAGS) $(CHECKER_FLAGS) $< @echo " [CC] $@" - $(Q)$(CC) $(CFLAGS) -c $< -o $@ $($(subst -,_,$(@:%.o=%)-cflags)) \ + $(Q)$(CC) $(CFLAGS) -c $< -o $@ $($(subst /,_,$(subst -,_,$(@:%.o=%)-cflags))) \ $($(subst -,_,btrfs-$(@:%/$(notdir $@)=%)-cflags)) %.static.o: %.c @echo " [CC] $@" - $(Q)$(CC) $(STATIC_CFLAGS) -c $< -o $@ $($(subst -,_,$(@:%.static.o=%)-cflags)) \ + $(Q)$(CC) $(STATIC_CFLAGS) -c $< -o $@ $($(subst /,_,$(subst -,_,$(@:%.static.o=%)-cflags))) \ $($(subst -,_,btrfs-$(@:%/$(notdir $@)=%)-cflags)) all: $(progs_build) $(libs_build) $(BUILDDIRS)