| # asm-offsets adapted from the kernel, see |
| # Authors: Andrew Jones <drjones@redhat.com> |
| 's:^[[:space:]]*\.ascii[[:space:]]*"\(.*\)".*:\1:; \ |
| /^->/{s:->#\(.*\):/* \1 */:; \ |
| s:^->\([^ ]*\) [\$$#]*\([-0-9]*\) \(.*\):#define \1 \2 /* \3 */:; \ |
| s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \ |
| echo "#ifndef __ASM_OFFSETS_H__"; \ |
| echo "#define __ASM_OFFSETS_H__"; \ |
| echo " * Generated file. DO NOT MODIFY."; \ |
| $(asm-offsets:.h=.s): $(asm-offsets:.h=.c) |
| $(CC) $(CFLAGS) -fverbose-asm -S -o $@ $< |
| $(asm-offsets): $(asm-offsets:.h=.s) |
| cp -f $(asm-offsets) lib/generated/ |
| $(RM) $(asm-offsets) $(asm-offsets:.h=.s) \ |
| $(addprefix lib/generated/,$(notdir $(asm-offsets))) |