[PATCH skeleton] Move .so library to lib directory
Patrick Williams
patrick at stwcx.xyz
Fri Oct 30 06:37:26 AEDT 2015
On Thu, Oct 29, 2015 at 12:40:25PM -0500, OpenBMC Patches wrote:
> From: Adriana Kobylak <anoo at us.ibm.com>
>
> Move .so library out of bin into lib to make recipe simpler
> Move the make all target to the top so that it's the default for make
> Make clean to delete all created targets
> ---
> Makefile | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 02f51f1..cbb62d8 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -5,7 +5,7 @@ OBJS += objects/pflash/arm_io.o
> OBJS2 = progress.o ast-sf-ctrl.o libflash.o libffs.o arm_io.o
> OBJS3 = obj/progress.o obj/ast-sf-ctrl.o obj/libflash.o obj/libffs.o obj/arm_io.o
> INCLUDES=$(shell pkg-config --cflags gio-unix-2.0 glib-2.0) -Iincludes -Iobjects/pflash -I.
> -LIBS=$(shell pkg-config --libs gio-unix-2.0 glib-2.0) -Lbin -lopenbmc_intf
> +LIBS=$(shell pkg-config --libs gio-unix-2.0 glib-2.0) -Llib -lopenbmc_intf
>
> %.o: interfaces/%.c
> $(CC) -c -fPIC -o obj/$@ $< $(CFLAGS) $(INCLUDES)
> @@ -22,14 +22,16 @@ LIBS=$(shell pkg-config --libs gio-unix-2.0 glib-2.0) -Lbin -lopenbmc_intf
> %.o: objects/pflash/libflash/%.c
> $(CC) -c -o obj/$@ $< $(CFLAGS) $(INCLUDES)
>
> +all: setup libopenbmc_intf power_control led_controller button_power control_host fan host_watchdog control_bmc board_vpd pcie_slot_present flash_bios flasher control_bmc_barreleye
> +
> setup:
> - mkdir -p obj
> + mkdir -p obj lib
>
> clean:
> - rm -rf obj
> + rm -rf obj lib bin/*.exe
>
> libopenbmc_intf: openbmc_intf.o
> - $(CC) -shared -o bin/$@.so obj/openbmc_intf.o $(LDFLAGS)
> + $(CC) -shared -o lib/$@.so obj/openbmc_intf.o $(LDFLAGS)
>
> power_control: power_control_obj.o gpio.o libopenbmc_intf
> $(CC) -o bin/$@.exe obj/gpio.o obj/power_control_obj.o $(LDFLAGS) $(LIBS)
> @@ -71,4 +73,3 @@ hwmon: hwmon_intf.o libopenbmc_intf
> $(CC) -o bin/$@.exe obj/hwmon_intf.o $(LDFLAGS) $(LIBS)
>
>
> -all: setup libopenbmc_intf power_control led_controller button_power control_host fan host_watchdog control_bmc board_vpd pcie_slot_present flash_bios flasher control_bmc_barreleye
You didn't need to move 'all' to the top in order to make it the
"default" goal. ".DEFAULT_GOAL: all" does the same thing.
> --
> 2.6.0
>
>
> _______________________________________________
> openbmc mailing list
> openbmc at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/openbmc
--
Patrick Williams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20151029/5567d08d/attachment.sig>
More information about the openbmc
mailing list