mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
synced 2025-01-10 13:03:43 +08:00
btrfs-progs: makefile: add support for additional build flags
Allow fine tuned build options via EXTRA_CFLAGS and EXTRA_LDFLAGS variables. Useful for additional debugging flags or warnings etc. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
0cdee628b1
commit
123f4bc78c
6
INSTALL
6
INSTALL
@ -42,7 +42,11 @@ Specific CFLAGS or LDFLAGS should be set like
|
||||
|
||||
$ CFLAGS=... LDFLAGS=... ./configure --prefix=/usr
|
||||
|
||||
and not as arguments to make.
|
||||
and not as arguments to make. You can specify additional flags to build via
|
||||
variables EXTRA_CFLAGS and EXTRA_LDFLAGS that get appended to the predefined
|
||||
values of the respective variables.
|
||||
|
||||
$ make EXTRA_CFLAGS=-ggdb3
|
||||
|
||||
References:
|
||||
* https://btrfs.wiki.kernel.org
|
||||
|
@ -10,16 +10,19 @@ INSTALL = @INSTALL@
|
||||
DISABLE_DOCUMENTATION = @DISABLE_DOCUMENTATION@
|
||||
DISABLE_BTRFSCONVERT = @DISABLE_BTRFSCONVERT@
|
||||
|
||||
EXTRA_CFLAGS :=
|
||||
EXTRA_LDFLAGS :=
|
||||
|
||||
# Common build flags
|
||||
CFLAGS = @CFLAGS@ \
|
||||
-include config.h \
|
||||
-DBTRFS_FLAT_INCLUDES \
|
||||
-D_XOPEN_SOURCE=700 \
|
||||
-fno-strict-aliasing \
|
||||
-fPIC
|
||||
-fPIC $(EXTRA_CFLAGS)
|
||||
|
||||
LDFLAGS = @LDFLAGS@ \
|
||||
-rdynamic
|
||||
-rdynamic $(EXTRA_LDFLAGS)
|
||||
|
||||
LIBS = @UUID_LIBS@ @BLKID_LIBS@ @ZLIB_LIBS@ @LZO2_LIBS@ -L. -pthread
|
||||
LIBBTRFS_LIBS = $(LIBS)
|
||||
|
Loading…
Reference in New Issue
Block a user