Commit f7fd268a authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Cyrill Gorcunov

gen-offsets.h: move arguments from Makefile to the script

Makes invocation way easier.
Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
parent 4bb4bfda
......@@ -91,12 +91,8 @@ $(HEAD-BIN): $(HEAD-LDS) $(OBJS-BLOB) parasite-util-net.o
$(HEAD-BLOB-GEN): $(HEAD-BIN) $(GEN-OFFSETS)
$(E) " GEN " $@
$(Q) $(SH) $(GEN-OFFSETS) \
parasite_h__ \
parasite_blob_offset__ \
parasite_blob \
$(OBJS-BLOB) \
$(HEAD-BIN) > parasite-blob.h
$(Q) $(SH) $(GEN-OFFSETS) parasite \
> parasite-blob.h
$(Q) sync
$(ROBJS): $(RSRCS-BLOB)
......@@ -109,12 +105,8 @@ $(RHEAD-BIN): $(ROBJS) $(RHEAD-LDS)
$(RHEAD-BLOB-GEN): $(RHEAD-BIN) $(GEN-OFFSETS)
$(E) " GEN " $@
$(Q) $(SH) $(GEN-OFFSETS) \
restorer_h__ \
restorer_blob_offset__ \
restorer_blob \
$(ROBJS-BLOB) \
$(RHEAD-BIN) > restorer-blob.h
$(Q) $(SH) $(GEN-OFFSETS) restorer \
> restorer-blob.h
$(Q) sync
%.o: %.c
......
#!/bin/sh
INC_GUARD=$1
PREFIX=$2
BLOB=$3
OBJNAME=$4
BINARY=$5
NAME=$1
INC_GUARD=__${NAME}_h__
PREFIX=${NAME}_blob_offset__
BLOB=${NAME}_blob
OBJNAME=${NAME}.o
BINARY=${NAME}.bin
AWK_CMD='$2 ~ /^[tT]$/ { print "#define '$PREFIX'" $3 " 0x" $1; }'
......
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