mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
build/make: return to make from top directory
It looks like, there is not so much that needs to be fixed for building criu from a top directory. After the patch it's possible to do `make criu/mount.o` i.e. It will build protobuf, compel as dependencies (if they are not built), but no more from criu objects. If something breaks, you can do make from vim and jump to error. Nice. Mostly the patch corrects pathes to objects - I tried to make them depend on $(obj) or $(SRC_DIR)/criu, where it's possible. After it tested: `make -j 10`, `make criu/log.o`, `make clean`, `make mrproper`, `make install DESTDIR=/tmp/criu`, `make uninstall DESTDIR=/tmp/criu` Note: I improperly called v1 for this patch as "return to make from top Makefile" -- but I didn't mean that (and it was friday ;) This patch doesn't yet switch to top-Makefile building, but that's a step in that way (building from a top Makefile needs correct pathes in makefiles) which also adds ability to build objects in subdirectories and etc. Cc: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
parent
a9a6240313
commit
7a3604845d
9 changed files with 88 additions and 80 deletions
14
Makefile
14
Makefile
|
|
@ -179,6 +179,8 @@ endif
|
|||
# on anything else.
|
||||
$(eval $(call gen-built-in,images))
|
||||
|
||||
.PHONY: .FORCE
|
||||
|
||||
#
|
||||
# CRIU building done in own directory
|
||||
# with slightly different rules so we
|
||||
|
|
@ -187,17 +189,17 @@ $(eval $(call gen-built-in,images))
|
|||
#
|
||||
# But note that we're already included
|
||||
# the nmk so we can reuse it there.
|
||||
criu/%: images/built-in.o $(VERSION_HEADER)
|
||||
$(Q) $(MAKE) -C criu $@
|
||||
criu/%: images/built-in.o $(VERSION_HEADER) .FORCE
|
||||
$(Q) $(MAKE) $(build)=criu $@
|
||||
criu: images/built-in.o $(VERSION_HEADER)
|
||||
$(Q) $(MAKE) -C criu all
|
||||
$(Q) $(MAKE) $(build)=criu all
|
||||
.PHONY: criu
|
||||
|
||||
#
|
||||
# Libraries next once criu it ready
|
||||
# (we might generate headers and such
|
||||
# when building criu itself).
|
||||
lib/%: criu
|
||||
lib/%: criu .FORCE
|
||||
$(Q) $(MAKE) -C lib $@
|
||||
lib: criu
|
||||
$(Q) $(MAKE) -C lib all
|
||||
|
|
@ -215,13 +217,13 @@ subclean:
|
|||
|
||||
clean: subclean
|
||||
$(Q) $(MAKE) $(build)=images $@
|
||||
$(Q) $(MAKE) -C criu $@
|
||||
$(Q) $(MAKE) $(build)=criu $@
|
||||
.PHONY: clean
|
||||
|
||||
# mrproper depends on clean in nmk
|
||||
mrproper: subclean
|
||||
$(Q) $(MAKE) $(build)=images $@
|
||||
$(Q) $(MAKE) -C criu $@
|
||||
$(Q) $(MAKE) $(build)=criu $@
|
||||
$(Q) $(RM) $(VERSION_HEADER)
|
||||
$(Q) $(RM) cscope.*
|
||||
$(Q) $(RM) tags TAGS
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue