blob: 03229be98d7d5f5d549a11cecf3bd80d8a9adc2f (
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
|
include $(__nmk_dir)/include.mk
include $(__nmk_dir)/macro.mk
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.$(CRIU_SO_VERSION_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 pycriu/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 pycriu/images $@
all: $(PHONY)
@true
PHONY += all
.PHONY: $(PHONY) clean
|