Import 2.3.99pre8
[davej-history.git] / arch / ia64 / tools / Makefile
blob06e38e3b47c5ab9154fd2ce4154eb30c1a05339f
1 CFLAGS = -g -O2 -Wall $(CPPFLAGS)
3 TARGET = $(TOPDIR)/include/asm-ia64/offsets.h
5 all:
7 mrproper:
9 clean:
10 rm -f print_offsets.s print_offsets offsets.h
12 fastdep: offsets.h
13 @if ! cmp -s offsets.h ${TARGET}; then \
14 echo "Updating ${TARGET}..."; \
15 cp offsets.h ${TARGET}; \
16 else \
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 $@
37 else
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 $@
45 endif
47 .PHONY: all