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/gdbus.mk b/gdbus.mk
index dcbf6c9..4b320cb 100644
--- a/gdbus.mk
+++ b/gdbus.mk
@@ -1,5 +1,5 @@
PACKAGE_DEPS=gio-unix-2.0 glib-2.0
-CFLAGS+=-iquote ../gdbus -iquote ../libopenbmc_intf
+ALL_CFLAGS+=-iquote ../gdbus -iquote ../libopenbmc_intf
LIBOBMC=$(TOP)/libopenbmc_intf/libopenbmc_intf.so.1
EXTRA_OBJS+=$(LIBOBMC)
@@ -8,4 +8,4 @@
$(MAKE) -C $(TOP)/libopenbmc_intf
%.o: %_obj.c
- $(CC) -c $(CFLAGS) -fPIC -o $@ $<
+ $(CC) -c $(ALL_CFLAGS) -o $@ $<