2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 14:25:49 +00:00

make: Add library building helpers

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Cyrill Gorcunov
2013-09-02 14:48:01 +04:00
committed by Pavel Emelyanov
parent b8a85cf57d
commit 63f89f83b8

View File

@@ -158,6 +158,16 @@ _all += $(obj)/built-in.o
endif
endif
##
## A rule for building library.
ifneq ($(lib-so),)
$(obj)/$(lib-so).so: $(all-objs) $(libs-e)
$(E) " LINK " $@
$(Q) $(CC) -shared $(cflags-so) -o $@ $^
_all += $(obj)/$(lib-so).so
endif
##
##
## Include deps if requested
@@ -175,6 +185,7 @@ cleanup-y += $(obj)/*.o $(obj)/*.d
cleanup-y += $(obj)/*.i $(obj)/*.s
cleanup-y += $(obj)/*.built-in.o
cleanup-y += $(obj)/built-in.o
cleanup-y += $(obj)/*.so
##
## Predefined .PHONY targets