Merge pull request #107 from bradbishop/dead
Remove dead code
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 $@ $<
diff --git a/libopenbmc_intf/Makefile b/libopenbmc_intf/Makefile
index 9cd7be6..8853318 100644
--- a/libopenbmc_intf/Makefile
+++ b/libopenbmc_intf/Makefile
@@ -2,11 +2,11 @@
INSTALLDEPS=install-lib
CLEANDEPS=clean-lib
DEFAULT_ALL=$(LIBOBMC)
-CFLAGS+=-iquote ../gdbus
+ALL_CFLAGS+=-iquote ../gdbus
LIBOBMC=openbmc_intf
$(LIBOBMC): %: %.o gpio.o
- $(CC) -shared $(LDFLAGS) -Wl,-soname,lib$(LIBOBMC).so \
+ $(CC) -shared $(CFLAGS) $(LDFLAGS) -Wl,-soname,lib$(LIBOBMC).so \
-o lib$@.so.1 $^ $(LDLIBS)
install-lib:
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 $@ $<
diff --git a/rules.mk b/rules.mk
index 9cad8cf..758e9f2 100644
--- a/rules.mk
+++ b/rules.mk
@@ -5,7 +5,7 @@
libdir=/usr/lib
LDLIBS+=$(shell pkg-config --libs $(PACKAGE_DEPS))
-CFLAGS+=$(shell pkg-config --cflags $(PACKAGE_DEPS)) -Werror
+ALL_CFLAGS+=$(shell pkg-config --cflags $(PACKAGE_DEPS)) -fPIC -Werror $(CFLAGS)
INSTALLDEPS?=install-bins
BIN_SUFFIX?=.exe
@@ -14,10 +14,10 @@
all: $(DEFAULT_ALL)
%.o: %.c
- $(CC) -c $(CFLAGS) -fPIC -o $@ $<
+ $(CC) -c $(ALL_CFLAGS) -o $@ $<
$(BINS): %: %.o $(EXTRA_OBJS)
- $(CC) $(LDFLAGS) -o $@$(BIN_SUFFIX) $^ $(LDLIBS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@$(BIN_SUFFIX) $^ $(LDLIBS)
install-bins:
@mkdir -p $(DESTDIR)$(sbindir)