2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 05:48:05 +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:
Cyrill Gorcunov 2012-01-23 11:26:00 +04:00
parent 2e070f114c
commit e69cea25db
2 changed files with 14 additions and 8 deletions

View File

@ -83,7 +83,16 @@ HEAD-BLOB-GEN := $(patsubst %.o,%-blob.h,$(OBJS-BLOB))
HEAD-BIN := $(patsubst %.o,%.bin,$(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))
RHEAD-BLOB-GEN := $(patsubst %.o,%-blob.h,$(ROBJS-BLOB))
@ -114,13 +123,13 @@ $(HEAD-BLOB-GEN): $(HEAD-BIN)
$(HEAD-BIN) > parasite-blob.h
$(Q) sync
$(ROBJS-BLOB): $(RSRCS-BLOB)
$(ROBJS): $(RSRCS-BLOB)
$(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 " $@
$(Q) $(LD) -T $(patsubst %.bin,%.lds.S,$@) $< -o $@
$(Q) $(LD) -T $(patsubst %.bin,%.lds.S,$@) -o $@ $(ROBJS)
$(RHEAD-BLOB-GEN): $(RHEAD-BIN) $(RDEPS-BLOB)
$(E) " GEN " $@

View File

@ -580,6 +580,3 @@ core_restore_end:
local_sleep(5);
sys_exit(0);
}
/* FIXME Need link this .o with ld */
#include "restorer-log.c"