From 8c03c648be0a6d447c259d7d810dd4057787f00d Mon Sep 17 00:00:00 2001 From: David Sterba Date: Mon, 28 Nov 2016 14:35:58 +0100 Subject: [PATCH] btrfs-progs: build: extend pattern rules for standalone directories Per-directory cflags and libs can be now defined as: btrfs-DIRNAME-cflags btrfs-DIRNAME-libs and will be newly used for all DIRNAME/*.[ch] files. Signed-off-by: David Sterba --- Makefile.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile.in b/Makefile.in index 4c8ecbf..8bfabe0 100644 --- a/Makefile.in +++ b/Makefile.in @@ -257,11 +257,13 @@ 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 -,_,$(@:%.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 -,_,$(@:%.static.o=%)-cflags)) \ + $($(subst -,_,btrfs-$(@:%/$(notdir $@)=%)-cflags)) all: $(progs) $(BUILDDIRS) $(SUBDIRS): $(BUILDDIRS) -- 2.7.4