diff options
author | Jan Engelhardt <jengelh@computergmbh.de> | 2007-12-11 09:22:42 -0500 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-12-11 09:22:42 -0500 |
commit | 66d0930cf68e6acf62bd505e0365e783bd14f981 (patch) | |
tree | 6cf6158c859ae55b89ce100742e677662f2d027c | |
parent | 4122e65cb2132e28e0c18106a251875d2e68c35d (diff) |
Makefile: CFLAGS, LDFLAGS
Split CFLAGS into CFLAGS (user part) and AM_CFLAGS (not-so-user part;
variable name taken from automake, but otherwise no relation).
Also add LDFLAGS.
This allows me to use `make CFLAGS="-O2 -fPIE" LDFLAGS="-pie"` without
dropping the other important (AM_CFLAGS) flags.
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
---
btrfs-progs/Makefile | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
-rw-r--r-- | Makefile | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -1,5 +1,6 @@ CC=gcc -CFLAGS = -g -Wall -fno-strict-aliasing -Werror -D_FILE_OFFSET_BITS=64 +AM_CFLAGS = -Wall -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 +CFLAGS = -g -Werror objects = ctree.o disk-io.o radix-tree.o extent-tree.o print-tree.o \ root-tree.o dir-item.o hash.o file-item.o inode-item.o \ inode-map.o crc32c.o rbtree.o extent-cache.o \ @@ -23,28 +24,28 @@ endif .c.o: $(check) $< - $(CC) $(DEPFLAGS) $(CFLAGS) -c $< + $(CC) $(DEPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c $< all: $(progs) btrfsctl: btrfsctl.o - gcc $(CFLAGS) -o btrfsctl btrfsctl.o + gcc $(CFLAGS) -o btrfsctl btrfsctl.o $(LDFLAGS) btrfsck: $(objects) btrfsck.o bit-radix.o - gcc $(CFLAGS) -o btrfsck btrfsck.o $(objects) bit-radix.o + gcc $(CFLAGS) -o btrfsck btrfsck.o $(objects) bit-radix.o $(LDFLAGS) mkfs.btrfs: $(objects) mkfs.o - gcc $(CFLAGS) -o mkfs.btrfs $(objects) mkfs.o -luuid + gcc $(CFLAGS) -o mkfs.btrfs $(objects) mkfs.o -luuid $(LDFLAGS) debug-tree: $(objects) debug-tree.o - gcc $(CFLAGS) -o debug-tree $(objects) debug-tree.o -luuid + gcc $(CFLAGS) -o debug-tree $(objects) debug-tree.o -luuid $(LDFLAGS) dir-test: $(objects) dir-test.o - gcc $(CFLAGS) -o dir-test $(objects) dir-test.o + gcc $(CFLAGS) -o dir-test $(objects) dir-test.o $(LDFLAGS) quick-test: $(objects) quick-test.o - gcc $(CFLAGS) -o quick-test $(objects) quick-test.o + gcc $(CFLAGS) -o quick-test $(objects) quick-test.o $(LDFLAGS) clean : rm -f $(progs) cscope.out *.o .*.d |