[PATCH skeleton] Makefile changes to fix bitbake errors in new LED
OpenBMC Patches
openbmc-patches at stwcx.xyz
Tue Feb 2 04:30:44 AEDT 2016
From: vishwa <vishwanath at in.ibm.com>
---
Makefile | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 65787ff..003a6eb 100755
--- a/Makefile
+++ b/Makefile
@@ -22,7 +22,7 @@ LIBS=$(shell pkg-config --libs gio-unix-2.0 glib-2.0) -Llib -lopenbmc_intf
%.o: objects/pflash/libflash/%.c
$(CC) -c -o obj/$@ $< $(CFLAGS) $(INCLUDES)
-all: setup libopenbmc_intf power_control led_controller button_power button_reset control_host host_watchdog board_vpd pcie_slot_present flash_bios flasher pflash hwmons_barreleye control_bmc
+all: setup libopenbmc_intf power_control led_controller button_power button_reset control_host host_watchdog board_vpd pcie_slot_present flash_bios flasher pflash hwmons_barreleye led_controller_new
setup:
mkdir -p obj lib
@@ -30,6 +30,9 @@ setup:
clean:
rm -rf obj lib bin/*.exe
+INC_FLAG += $(shell pkg-config --cflags --libs libsystemd) -I. -O2
+LIB_FLAG += $(shell pkg-config --libs libsystemd)
+
libopenbmc_intf: openbmc_intf.o
$(CC) -shared -o lib/$@.so obj/openbmc_intf.o $(LDFLAGS)
@@ -40,7 +43,7 @@ led_controller: led_controller.o gpio.o object_mapper.o libopenbmc_intf
$(CC) -o bin/$@.exe obj/gpio.o obj/led_controller.o obj/object_mapper.o $(LDFLAGS) $(LIBS)
led_controller_new: led_controller_new.o
- $(CC) -o bin/$@.exe obj/led_controller_new.o $(LDFLAGS) $(LIBS) -lsystemd
+ $(CC) $(INC_FLAG) -o bin/$@.exe obj/led_controller_new.o $(LDFLAGS) $(LIBS) $(LIB_FLAG)
button_power: button_power_obj.o gpio.o object_mapper.o libopenbmc_intf
$(CC) -o bin/$@.exe obj/button_power_obj.o obj/gpio.o obj/object_mapper.o $(LDFLAGS) $(LIBS)
@@ -73,6 +76,3 @@ pflash: $(OBJS2) pflash.o
hwmons_barreleye: hwmons_barreleye.o object_mapper.o libopenbmc_intf
$(CC) -o bin/$@.exe obj/hwmons_barreleye.o obj/object_mapper.o $(LDFLAGS) $(LIBS)
-control_bmc: control_bmc_obj.o libopenbmc_intf
- $(CC) -o bin/$@.exe obj/control_bmc_obj.o $(LDFLAGS) $(LIBS)
-
--
2.6.4
More information about the openbmc
mailing list