criu/lib/py/Makefile
Kir Kolyshkin 2a9d9c6615 lib Makefiles: integrate
Our whole system of Makefiles are integrated from top to bottom,
meaning:

 1. The paths in sub-makefiles are relative to the top source dir.
 2. Sub-makefiles are executed via make $(build)=<SUBDIR> <TARGET>

For some reason, makefiles under lib/ are the exclusion. Let's fix it.

Side effect: you can now build any individual target under lib/,
for example, "make lib/c/libcriu.so" works.

[v2: use the .FORCE, thanks to dsafonov@]

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-06 20:44:07 +03:00

20 lines
448 B
Makefile

all-y += libpy-images rpc_pb2.py
.PHONY: .FORCE
$(obj)/images/%: .FORCE
$(Q) $(MAKE) $(build)=$(obj)/images $@
libpy-images:
$(Q) $(MAKE) $(build)=$(obj)/images all
.PHONY: libpy-images
rpc_pb2.py:
$(Q) protoc -I=$(SRC_DIR)/images/ --python_out=$(obj) $(SRC_DIR)/images/$(@:_pb2.py=.proto)
cleanup-y += $(addprefix $(obj)/,rpc_pb2.py *.pyc)
clean-lib-py:
$(Q) $(MAKE) $(build)=$(obj)/images clean
.PHONY: clean-lib-py
clean: clean-lib-py