diff options
author | David Sterba <dsterba@suse.com> | 2016-11-28 14:35:58 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-12-14 15:06:35 +0100 |
commit | 8c03c648be0a6d447c259d7d810dd4057787f00d (patch) | |
tree | 6ceb339348b3f5a6f9b2691e97361cae12504075 | |
parent | 44c22cf8be0aa4111c8126602c64d9634750f10d (diff) |
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 <dsterba@suse.com>
-rw-r--r-- | Makefile.in | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile.in b/Makefile.in index 4c8ecbfb..8bfabe0c 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) |