summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2012-03-15 14:09:08 +0100
committerFlorian Pritz <bluewind@xinu.at>2012-03-15 14:09:08 +0100
commit7921208aba851b1e7565f58ac957f81e1e16200a (patch)
tree355a1ba76b3c4ad2ed13d14b164127447b58aa04
parent30765cea3f5a6db8f4fdc57571324903c758784c (diff)
Makefile: get rid of MY_CFLAGS; allow users to override CFLAGS
CFLAGS=-O0 make; will still work as expected make CFLAGS=-O0; allows to completely override the flags, ignoring what is set in the makefile. Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--Makefile5
1 files changed, 2 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 7fb655d..238de2b 100644
--- a/Makefile
+++ b/Makefile
@@ -4,8 +4,7 @@ BINDIR=/usr/bin
LIBDIR=/usr/lib
MY_LIBDIR=$(LIBDIR)/fb-client
CC=cc
-CFLAGS?=-O2
-MY_CFLAGS=-std=c99 -Wall -Wextra -pedantic
+CFLAGS:=-std=c99 -O2 -Wall -Wextra -pedantic $(CFLAGS)
LIBCURL:=$(shell pkg-config --silence-errors --libs --cflags libcurl)
ifdef LIBCURL
@@ -20,7 +19,7 @@ fb: fb.in
chmod 755 $@
fb-helper: fb-helper.c
- $(CC) $(MY_CFLAGS) $(CFLAGS) $(LIBCURL) -DVERSION=\"$(VERSION)\" -o $@ $<
+ $(CC) $(CFLAGS) $(LIBCURL) -DVERSION=\"$(VERSION)\" -o $@ $<
clean:
rm -f fb fb-helper