1 CFLAGS
= -g
-O2
-Wall
$(CPPFLAGS
)
3 TARGET
= $(TOPDIR
)/include/asm-ia64
/offsets.h
10 rm -f print_offsets.s print_offsets offsets.h
13 @if
! cmp
-s offsets.h
${TARGET}; then \
14 echo
"Updating ${TARGET}..."; \
15 cp offsets.h
${TARGET}; \
17 echo
"${TARGET} is up to date"; \
21 # If we're cross-compiling, we use the cross-compiler to translate
22 # print_offsets.c into an assembly file and then awk to translate this
23 # file into offsets.h. This avoids having to use a simulator to
24 # generate this file. This is based on an idea suggested by Asit
25 # Mallick. If we're running natively, we can of course just build
26 # print_offsets and run it. --davidm
29 ifeq ($(CROSS_COMPILE
),)
31 offsets.h
: print_offsets
32 .
/print_offsets
> offsets.h
34 print_offsets
: print_offsets.c
35 $(CC
) $(CFLAGS
) print_offsets.c
-o
$@
39 offsets.h
: print_offsets.s
40 $(AWK
) -f print_offsets.awk
$^
> $@
42 print_offsets.s
: print_offsets.c
43 $(CC
) $(CFLAGS
) -S print_offsets.c
-o
$@