Commit 4bb4bfda authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Cyrill Gorcunov

Makefile: introduce, depend on and use GEN_OFFSETS

1. We need to regenerate *-blob.h files if generating script changes

2. Do not use hardcoded script name
Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
parent e315bea3
...@@ -73,6 +73,8 @@ DEPS := $(patsubst %.o,%.d,$(OBJS)) \ ...@@ -73,6 +73,8 @@ DEPS := $(patsubst %.o,%.d,$(OBJS)) \
$(patsubst %.o,%.d,$(OBJS-BLOB)) \ $(patsubst %.o,%.d,$(OBJS-BLOB)) \
$(patsubst %.o,%.d,$(ROBJS-BLOB)) $(patsubst %.o,%.d,$(ROBJS-BLOB))
GEN-OFFSETS := gen-offsets.sh
all: $(PROGRAM) all: $(PROGRAM)
$(OBJS-BLOB): $(SRCS-BLOB) $(OBJS-BLOB): $(SRCS-BLOB)
...@@ -87,9 +89,9 @@ $(HEAD-BIN): $(HEAD-LDS) $(OBJS-BLOB) parasite-util-net.o ...@@ -87,9 +89,9 @@ $(HEAD-BIN): $(HEAD-LDS) $(OBJS-BLOB) parasite-util-net.o
$(E) " GEN " $@ $(E) " GEN " $@
$(Q) $(LD) -T $^ -o $@ $(Q) $(LD) -T $^ -o $@
$(HEAD-BLOB-GEN): $(HEAD-BIN) $(HEAD-BLOB-GEN): $(HEAD-BIN) $(GEN-OFFSETS)
$(E) " GEN " $@ $(E) " GEN " $@
$(Q) $(SH) gen-offsets.sh \ $(Q) $(SH) $(GEN-OFFSETS) \
parasite_h__ \ parasite_h__ \
parasite_blob_offset__ \ parasite_blob_offset__ \
parasite_blob \ parasite_blob \
...@@ -105,9 +107,9 @@ $(RHEAD-BIN): $(ROBJS) $(RHEAD-LDS) ...@@ -105,9 +107,9 @@ $(RHEAD-BIN): $(ROBJS) $(RHEAD-LDS)
$(E) " GEN " $@ $(E) " GEN " $@
$(Q) $(LD) -T $(patsubst %.bin,%.lds.S,$@) -o $@ $(ROBJS) $(Q) $(LD) -T $(patsubst %.bin,%.lds.S,$@) -o $@ $(ROBJS)
$(RHEAD-BLOB-GEN): $(RHEAD-BIN) $(RHEAD-BLOB-GEN): $(RHEAD-BIN) $(GEN-OFFSETS)
$(E) " GEN " $@ $(E) " GEN " $@
$(Q) $(SH) gen-offsets.sh \ $(Q) $(SH) $(GEN-OFFSETS) \
restorer_h__ \ restorer_h__ \
restorer_blob_offset__ \ restorer_blob_offset__ \
restorer_blob \ restorer_blob \
......
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