mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-29 13:28:27 +00:00
Merge branch 'stas-make' into dev
* stas-make: make: fix parasite deps make: cleanup deps files usage make: cleanup deps files mess make: cleanup targets mess cr-dump: remove unnessesary parasite header Conflicts: Makefile Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
This commit is contained in:
commit
74bb5d9a26
61
Makefile
61
Makefile
@ -60,13 +60,14 @@ PROGRAM := crtools
|
|||||||
|
|
||||||
export CC ECHO MAKE CFLAGS LIBS ARCH DEFINES
|
export CC ECHO MAKE CFLAGS LIBS ARCH DEFINES
|
||||||
|
|
||||||
all: $(PROGRAM)
|
OBJS_GEN_DEP += parasite-syscall.o
|
||||||
|
OBJS_GEN_DEP += cr-restore.o
|
||||||
|
DEPS_GEN := $(patsubst %.o,%.d,$(OBJS_GEN_DEP))
|
||||||
|
|
||||||
|
OBJS += $(OBJS_GEN_DEP)
|
||||||
OBJS += crtools.o
|
OBJS += crtools.o
|
||||||
OBJS += proc_parse.o
|
OBJS += proc_parse.o
|
||||||
OBJS += parasite-syscall.o
|
|
||||||
OBJS += cr-dump.o
|
OBJS += cr-dump.o
|
||||||
OBJS += cr-restore.o
|
|
||||||
OBJS += cr-show.o
|
OBJS += cr-show.o
|
||||||
OBJS += util.o
|
OBJS += util.o
|
||||||
OBJS += ptrace.o
|
OBJS += ptrace.o
|
||||||
@ -75,12 +76,9 @@ OBJS += libnetlink.o
|
|||||||
OBJS += sockets.o
|
OBJS += sockets.o
|
||||||
OBJS += files.o
|
OBJS += files.o
|
||||||
|
|
||||||
DEPS := $(patsubst %.o,%.d,$(OBJS))
|
|
||||||
|
|
||||||
HEADERS := $(shell find ./include/* -name '*.h' -print)
|
HEADERS := $(shell find ./include/* -name '*.h' -print)
|
||||||
|
|
||||||
OBJS-BLOB += parasite.o
|
OBJS-BLOB += parasite.o
|
||||||
DEPS-BLOB += $(patsubst %.o,%.d,$(OBJS-BLOB))
|
|
||||||
SRCS-BLOB += $(patsubst %.o,%.c,$(OBJS-BLOB))
|
SRCS-BLOB += $(patsubst %.o,%.c,$(OBJS-BLOB))
|
||||||
|
|
||||||
HEAD-BLOB-GEN := $(patsubst %.o,%-blob.h,$(OBJS-BLOB))
|
HEAD-BLOB-GEN := $(patsubst %.o,%-blob.h,$(OBJS-BLOB))
|
||||||
@ -89,24 +87,6 @@ HEAD-LDS := $(patsubst %.o,%.lds.S,$(OBJS-BLOB))
|
|||||||
|
|
||||||
HEAD-IDS := $(patsubst %.h,%_h__,$(subst -,_,$(HEAD-BLOB)))
|
HEAD-IDS := $(patsubst %.h,%_h__,$(subst -,_,$(HEAD-BLOB)))
|
||||||
|
|
||||||
$(OBJS-BLOB): $(SRCS-BLOB)
|
|
||||||
$(E) " CC " $@
|
|
||||||
$(Q) $(CC) -c $(CFLAGS) -fpic $< -o $@
|
|
||||||
|
|
||||||
$(HEAD-BIN): $(OBJS-BLOB) $(HEAD-LDS)
|
|
||||||
$(E) " GEN " $@
|
|
||||||
$(Q) $(LD) -T $(patsubst %.bin,%.lds.S,$@) $< -o $@
|
|
||||||
|
|
||||||
$(HEAD-BLOB-GEN): $(HEAD-BIN) $(DEPS-BLOB)
|
|
||||||
$(E) " GEN " $@
|
|
||||||
$(Q) $(SH) gen-offsets.sh \
|
|
||||||
parasite_h__ \
|
|
||||||
parasite_blob_offset__ \
|
|
||||||
parasite_blob \
|
|
||||||
$(OBJS-BLOB) \
|
|
||||||
$(HEAD-BIN) > parasite-blob.h
|
|
||||||
$(Q) sync
|
|
||||||
|
|
||||||
ROBJS-BLOB = restorer.o
|
ROBJS-BLOB = restorer.o
|
||||||
RDEPS-BLOB += $(patsubst %.o,%.d,$(ROBJS-BLOB))
|
RDEPS-BLOB += $(patsubst %.o,%.d,$(ROBJS-BLOB))
|
||||||
RSRCS-BLOB += $(patsubst %.o,%.c,$(ROBJS-BLOB))
|
RSRCS-BLOB += $(patsubst %.o,%.c,$(ROBJS-BLOB))
|
||||||
@ -117,6 +97,28 @@ RHEAD-LDS := $(patsubst %.o,%.lds.S,$(ROBJS-BLOB))
|
|||||||
|
|
||||||
RHEAD-IDS := $(patsubst %.h,%_h__,$(subst -,_,$(RHEAD-BLOB)))
|
RHEAD-IDS := $(patsubst %.h,%_h__,$(subst -,_,$(RHEAD-BLOB)))
|
||||||
|
|
||||||
|
DEPS := $(patsubst %.o,%.d,$(OBJS)) $(patsubst %.o,%.d,$(OBJS-BLOB))
|
||||||
|
|
||||||
|
all: $(PROGRAM)
|
||||||
|
|
||||||
|
$(OBJS-BLOB): $(SRCS-BLOB)
|
||||||
|
$(E) " CC " $@
|
||||||
|
$(Q) $(CC) -c $(CFLAGS) -fpic $< -o $@
|
||||||
|
|
||||||
|
$(HEAD-BIN): $(OBJS-BLOB) $(HEAD-LDS)
|
||||||
|
$(E) " GEN " $@
|
||||||
|
$(Q) $(LD) -T $(patsubst %.bin,%.lds.S,$@) $< -o $@
|
||||||
|
|
||||||
|
$(HEAD-BLOB-GEN): $(HEAD-BIN)
|
||||||
|
$(E) " GEN " $@
|
||||||
|
$(Q) $(SH) gen-offsets.sh \
|
||||||
|
parasite_h__ \
|
||||||
|
parasite_blob_offset__ \
|
||||||
|
parasite_blob \
|
||||||
|
$(OBJS-BLOB) \
|
||||||
|
$(HEAD-BIN) > parasite-blob.h
|
||||||
|
$(Q) sync
|
||||||
|
|
||||||
$(ROBJS-BLOB): $(RSRCS-BLOB)
|
$(ROBJS-BLOB): $(RSRCS-BLOB)
|
||||||
$(E) " CC " $@
|
$(E) " CC " $@
|
||||||
$(Q) $(CC) -c $(CFLAGS) -fpic $< -o $@
|
$(Q) $(CC) -c $(CFLAGS) -fpic $< -o $@
|
||||||
@ -135,7 +137,6 @@ $(RHEAD-BLOB-GEN): $(RHEAD-BIN) $(RDEPS-BLOB)
|
|||||||
$(RHEAD-BIN) > restorer-blob.h
|
$(RHEAD-BIN) > restorer-blob.h
|
||||||
$(Q) sync
|
$(Q) sync
|
||||||
|
|
||||||
$(OBJS): $(DEPS) $(HEAD-BLOB-GEN) $(RHEAD-BLOB-GEN)
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
$(E) " CC " $@
|
$(E) " CC " $@
|
||||||
$(Q) $(CC) -c $(CFLAGS) $< -o $@
|
$(Q) $(CC) -c $(CFLAGS) $< -o $@
|
||||||
@ -144,13 +145,10 @@ $(PROGRAM): $(OBJS)
|
|||||||
$(E) " LINK " $@
|
$(E) " LINK " $@
|
||||||
$(Q) $(CC) $(CFLAGS) $(OBJS) $(LIBS) -o $@
|
$(Q) $(CC) $(CFLAGS) $(OBJS) $(LIBS) -o $@
|
||||||
|
|
||||||
$(DEPS): $(HEAD-BLOB-GEN) $(HEADERS) $(RHEAD-BLOB-GEN) $(RHEADERS)
|
$(DEPS_GEN): $(HEAD-BLOB-GEN) $(RHEAD-BLOB-GEN)
|
||||||
%.d: %.c
|
%.d: %.c
|
||||||
$(Q) $(CC) -M -MT $(patsubst %.d,%.o,$@) $(CFLAGS) $< -o $@
|
$(Q) $(CC) -M -MT $(patsubst %.d,%.o,$@) $(CFLAGS) $< -o $@
|
||||||
|
|
||||||
$(DEPS-BLOB) $(RDEPS-BLOB): $(SRCS-BLOB) $(RSRCS-BLOB)
|
|
||||||
$(Q) $(CC) -M -MT $(patsubst %.d,%.o,$@) $(CFLAGS) $< -o $@
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
$(Q) $(MAKE) -C test all
|
$(Q) $(MAKE) -C test all
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
@ -172,7 +170,8 @@ clean:
|
|||||||
$(Q) $(RM) -f ./tags
|
$(Q) $(RM) -f ./tags
|
||||||
$(Q) $(RM) -f ./cscope*
|
$(Q) $(RM) -f ./cscope*
|
||||||
$(Q) $(RM) -f ./$(PROGRAM)
|
$(Q) $(RM) -f ./$(PROGRAM)
|
||||||
$(Q) $(RM) -f ./$(HEAD-BLOB-GEN) ./$(RHEAD-BLOB-GEN)
|
$(Q) $(RM) -f ./$(HEAD-BLOB-GEN)
|
||||||
|
$(Q) $(RM) -f ./$(RHEAD-BLOB-GEN)
|
||||||
$(Q) $(MAKE) -C test clean
|
$(Q) $(MAKE) -C test clean
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
|
|
||||||
@ -187,3 +186,5 @@ cscope:
|
|||||||
$(Q) $(FIND) . -name '*.[hcS]' -print > cscope.files
|
$(Q) $(FIND) . -name '*.[hcS]' -print > cscope.files
|
||||||
$(Q) $(CSCOPE) -bkqu
|
$(Q) $(CSCOPE) -bkqu
|
||||||
.PHONY: cscope
|
.PHONY: cscope
|
||||||
|
|
||||||
|
-include $(DEPS)
|
||||||
|
@ -30,7 +30,6 @@
|
|||||||
#include "image.h"
|
#include "image.h"
|
||||||
#include "proc_parse.h"
|
#include "proc_parse.h"
|
||||||
#include "parasite-syscall.h"
|
#include "parasite-syscall.h"
|
||||||
#include "parasite-blob.h"
|
|
||||||
|
|
||||||
#ifndef CONFIG_X86_64
|
#ifndef CONFIG_X86_64
|
||||||
# error No x86-32 support yet
|
# error No x86-32 support yet
|
||||||
|
Loading…
x
Reference in New Issue
Block a user