2016-02-15 15:26:53 +03:00
|
|
|
include $(__nmk_dir)/include.mk
|
|
|
|
include $(__nmk_dir)/macro.mk
|
2013-07-18 21:47:11 +04:00
|
|
|
|
2016-02-15 15:26:53 +03:00
|
|
|
CRIU_SO := libcriu.so
|
|
|
|
|
|
|
|
#
|
|
|
|
# C language bindings.
|
|
|
|
c/%:
|
|
|
|
$(call msg-gen, $@)
|
|
|
|
$(Q) $(MAKE) $(build)=c $@
|
|
|
|
c/built-in.o:
|
|
|
|
$(call msg-gen, $@)
|
|
|
|
$(Q) $(MAKE) $(build)=c all
|
|
|
|
|
2016-02-18 12:43:27 +03:00
|
|
|
cflags-so += $(CFLAGS) -rdynamic -Wl,-soname,$(lib-so).so.$(CRIU_SO_VERSION_MAJOR)
|
2013-12-18 01:04:38 +04:00
|
|
|
ldflags-so += -lprotobuf-c
|
2016-02-15 15:26:53 +03:00
|
|
|
c/$(CRIU_SO): c/built-in.o
|
|
|
|
$(call msg-link, $@)
|
2016-02-15 15:26:55 +03:00
|
|
|
$(Q) $(CC) -shared $(cflags-so) -o $@ $^ $(ldflags-so) $(LDFLAGS)
|
2016-02-15 15:26:53 +03:00
|
|
|
lib-c: c/$(CRIU_SO)
|
|
|
|
PHONY += lib-c
|
|
|
|
|
|
|
|
#
|
|
|
|
# Python bindings.
|
|
|
|
lib-py:
|
|
|
|
$(call msg-gen, $@)
|
2016-02-15 15:26:58 +03:00
|
|
|
$(Q) $(MAKE) -C pycriu/images all
|
2016-02-15 15:26:53 +03:00
|
|
|
PHONY += lib-py
|
2013-07-18 21:47:11 +04:00
|
|
|
|
2016-02-15 15:26:53 +03:00
|
|
|
clean:
|
|
|
|
$(call msg-clean, lib-c)
|
|
|
|
$(Q) $(MAKE) $(build)=c $@
|
|
|
|
$(Q) $(RM) c/$(CRIU_SO)
|
|
|
|
$(call msg-clean, lib-py)
|
2016-02-15 15:26:58 +03:00
|
|
|
$(Q) $(MAKE) -C pycriu/images $@
|
2013-07-18 21:47:11 +04:00
|
|
|
|
2016-02-15 15:26:53 +03:00
|
|
|
all: $(PHONY)
|
|
|
|
@true
|
|
|
|
PHONY += all
|
2016-02-15 15:26:55 +03:00
|
|
|
|
|
|
|
.PHONY: $(PHONY) clean
|