diff options
author | David Sterba <dsterba@suse.com> | 2016-08-23 18:04:37 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-08-24 14:37:36 +0200 |
commit | aa07e4be0060750b31bb2f7664b6de003b86aa01 (patch) | |
tree | 73a51f478074667bc1a36611e7bd5b1e03ca4507 /Makefile.in | |
parent | b762b78a60d7fe2c70965d5b061448295536b3df (diff) |
btrfs-progs: build: add per-tool cflags variable
The standalone tools are built from pattern rules, add support for
per-tool cflaags, like btrfs_something_clfags.
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Makefile.in b/Makefile.in index 9e0cb4c4..1928a4ef 100644 --- a/Makefile.in +++ b/Makefile.in @@ -221,15 +221,18 @@ endif %.o.d: %.c $(Q)$(CC) -MM -MG -MF $@ -MT $(@:.o.d=.o) -MT $(@:.o.d=.static.o) -MT $@ $(CFLAGS) $< +# +# Pick from per-file variables, btrfs_*_cflags +# .c.o: @$(check_echo) " [SP] $<" $(Q)$(check) $(CFLAGS) $(CHECKER_FLAGS) $< @echo " [CC] $@" - $(Q)$(CC) $(CFLAGS) -c $< + $(Q)$(CC) $(CFLAGS) -c $< $($(subst -,_,$(@:%.o=%)-cflags)) %.static.o: %.c @echo " [CC] $@" - $(Q)$(CC) $(STATIC_CFLAGS) -c $< -o $@ + $(Q)$(CC) $(STATIC_CFLAGS) -c $< -o $@ $($(subst -,_,$(@:%.static.o=%)-cflags)) all: $(progs) $(BUILDDIRS) $(SUBDIRS): $(BUILDDIRS) |