Enable user-overriable CFLAGS
Put required CFLAGS (ie pkg-config --cflags) in ALL_CFLAGS and append
user specified CFLAGS to that.
Use CFLAGS during link.
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/op-flasher/Makefile b/op-flasher/Makefile
index 80b9ccb..6876ad0 100644
--- a/op-flasher/Makefile
+++ b/op-flasher/Makefile
@@ -4,11 +4,11 @@
libflash.o \
libffs.o \
arm_io.o
-CFLAGS+=-Ipflash
+ALL_CFLAGS+=-Ipflash
include ../gdbus.mk
include ../rules.mk
%.o: pflash/%.c
- $(CC) -c -o $(CFLAGS) -fPIC -o $@ $<
+ $(CC) -c $(ALL_CFLAGS) -o $@ $<
%.o: pflash/libflash/%.c
- $(CC) -c -o $(CFLAGS) -fPIC -o $@ $<
+ $(CC) -c $(ALL_CFLAGS) -o $@ $<