blob: d1b0450599f86aa70303e147f1b034ad62b46d95 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
include $(__nmk_dir)/include.mk
include $(__nmk_dir)/macro.mk
VERSION_SO_MAJOR := 1
VERSION_SO_MINOR := 0
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
cflags-so += $(CFLAGS) -rdynamic -Wl,-soname,$(lib-so).so.$(VERSION_SO_MAJOR)
ldflags-so += -lprotobuf-c
c/$(CRIU_SO): c/built-in.o
$(call msg-link, $@)
$(Q) $(CC) -shared $(cflags-so) -o $@ $^ $(ldflags-so) $(LDFLAGS)
lib-c: c/$(CRIU_SO)
PHONY += lib-c
#
# Python bindings.
lib-py:
$(call msg-gen, $@)
$(Q) $(MAKE) -C py/images all
PHONY += lib-py
clean:
$(call msg-clean, lib-c)
$(Q) $(MAKE) $(build)=c $@
$(Q) $(RM) c/$(CRIU_SO)
$(call msg-clean, lib-py)
$(Q) $(MAKE) -C py/images $@
all: $(PHONY)
@true
PHONY += all
.PHONY: $(PHONY) clean
|