summaryrefslogtreecommitdiff
path: root/kernel/ia64/Makefile.pre
blob: 033bdeee9c7a1e60c3c3b3fcb65ca50886c935a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
prerequisite: asm-offsets.h ia64/memset.S ia64/memcpy.S
	cp -f $(KERNELDIR)/arch/ia64/lib/memcpy.S ia64/memcpy.S
	cp -f $(KERNELDIR)/arch/ia64/lib/memset.S ia64/memset.S
	cmp -s asm-offset.h ia64/asm-offset.h || mv -f asm-offsets.* ia64/

asm-offsets.h: asm-offsets.s
	@(set -e; \
	  echo "/*"; \
	  echo " * DO NOT MODIFY."; \
	  echo " *"; \
	  echo " * This file was auto-generated from $<"; \
	  echo " *"; \
	  echo " */"; \
	  echo ""; \
	  echo "#ifndef __KVM_ASM_OFFSETS_H__"; \
	  echo "#define __KVM_ASM_OFFSETS_H__"; \
	  echo ""; \
	  sed -ne "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"; \
	  echo ""; \
	  echo "#endif") <$< >$@

asm-offsets.s: ia64/asm-offsets.c
	gcc -S -D__KERNEL__ -I$(KERNELDIR)/include -I./include ia64/asm-offsets.c