mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-01 14:55:39 +00:00
make: Drop restorer-log.c inclusion in restorer.c
Compile it as a separate file and use ld to merge two files. Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Acked-by: Andrey Vagin <avagin@openvz.org>
This commit is contained in:
19
Makefile
19
Makefile
@@ -83,7 +83,16 @@ HEAD-BLOB-GEN := $(patsubst %.o,%-blob.h,$(OBJS-BLOB))
|
|||||||
HEAD-BIN := $(patsubst %.o,%.bin,$(OBJS-BLOB))
|
HEAD-BIN := $(patsubst %.o,%.bin,$(OBJS-BLOB))
|
||||||
HEAD-LDS := $(patsubst %.o,%.lds.S,$(OBJS-BLOB))
|
HEAD-LDS := $(patsubst %.o,%.lds.S,$(OBJS-BLOB))
|
||||||
|
|
||||||
ROBJS-BLOB = restorer.o
|
ROBJS-BLOB := restorer.o
|
||||||
|
#
|
||||||
|
# Everything embedded into restorer as a separate
|
||||||
|
# object file should go here.
|
||||||
|
ROBJS := $(ROBJS-BLOB)
|
||||||
|
ROBJS += restorer-log.o
|
||||||
|
|
||||||
|
RDEPS-BLOB += $(patsubst %.o,%.d,$(ROBJS))
|
||||||
|
RSRCS-BLOB += $(patsubst %.o,%.c,$(ROBJS))
|
||||||
|
|
||||||
RSRCS-BLOB += $(patsubst %.o,%.c,$(ROBJS-BLOB))
|
RSRCS-BLOB += $(patsubst %.o,%.c,$(ROBJS-BLOB))
|
||||||
|
|
||||||
RHEAD-BLOB-GEN := $(patsubst %.o,%-blob.h,$(ROBJS-BLOB))
|
RHEAD-BLOB-GEN := $(patsubst %.o,%-blob.h,$(ROBJS-BLOB))
|
||||||
@@ -114,13 +123,13 @@ $(HEAD-BLOB-GEN): $(HEAD-BIN)
|
|||||||
$(HEAD-BIN) > parasite-blob.h
|
$(HEAD-BIN) > parasite-blob.h
|
||||||
$(Q) sync
|
$(Q) sync
|
||||||
|
|
||||||
$(ROBJS-BLOB): $(RSRCS-BLOB)
|
$(ROBJS): $(RSRCS-BLOB)
|
||||||
$(E) " CC " $@
|
$(E) " CC " $@
|
||||||
$(Q) $(CC) -c $(CFLAGS) -fpic $< -o $@
|
$(Q) $(CC) -c $(CFLAGS) -fpic $(patsubst %.o,%.c,$@) -o $@
|
||||||
|
|
||||||
$(RHEAD-BIN): $(ROBJS-BLOB) $(RHEAD-LDS)
|
$(RHEAD-BIN): $(ROBJS) $(RHEAD-LDS)
|
||||||
$(E) " GEN " $@
|
$(E) " GEN " $@
|
||||||
$(Q) $(LD) -T $(patsubst %.bin,%.lds.S,$@) $< -o $@
|
$(Q) $(LD) -T $(patsubst %.bin,%.lds.S,$@) -o $@ $(ROBJS)
|
||||||
|
|
||||||
$(RHEAD-BLOB-GEN): $(RHEAD-BIN) $(RDEPS-BLOB)
|
$(RHEAD-BLOB-GEN): $(RHEAD-BIN) $(RDEPS-BLOB)
|
||||||
$(E) " GEN " $@
|
$(E) " GEN " $@
|
||||||
|
@@ -580,6 +580,3 @@ core_restore_end:
|
|||||||
local_sleep(5);
|
local_sleep(5);
|
||||||
sys_exit(0);
|
sys_exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME Need link this .o with ld */
|
|
||||||
#include "restorer-log.c"
|
|
||||||
|
Reference in New Issue
Block a user