Commit e69cea25 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov

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: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Acked-by: 's avatarAndrey Vagin <avagin@openvz.org>
parent 2e070f11
...@@ -83,7 +83,16 @@ HEAD-BLOB-GEN := $(patsubst %.o,%-blob.h,$(OBJS-BLOB)) ...@@ -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) ...@@ -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: ...@@ -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"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment