File: Makefile

package info (click to toggle)
kernel-image-2.4.17-hppa 32.4
  • links: PTS
  • area: main
  • in suites: woody
  • size: 156,356 kB
  • ctags: 442,585
  • sloc: ansic: 2,542,442; asm: 144,771; makefile: 8,468; sh: 3,097; perl: 2,578; yacc: 1,177; tcl: 577; lex: 352; awk: 251; lisp: 218; sed: 72
file content (39 lines) | stat: -rw-r--r-- 1,230 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#
# linux/arch/arm/tools/Makefile
#
# Copyright (C) 2001 Russell King
#

all:	$(TOPDIR)/include/asm-arm/mach-types.h \
	$(TOPDIR)/include/asm-arm/constants.h

$(TOPDIR)/include/asm-arm/mach-types.h: mach-types gen-mach-types
	awk -f gen-mach-types mach-types > $@

# Generate the constants.h header file using the compiler.  We get
# the compiler to spit out assembly code, and then mundge it into
# what we want.  We do this in several stages so make picks up on
# any errors that occur along the way.

$(TOPDIR)/include/asm-arm/constants.h: constants-hdr getconstants.c
	$(CC) $(CFLAGS) -S -o - getconstants.c > $@.tmp.1
	sed 's/^\(#define .* \)[#$$]\(.*\)/\1\2/;/^#define/!d' $@.tmp.1 > $@.tmp.2
	cat constants-hdr $@.tmp.2 > $@.tmp
	cmp $@.tmp $@ >/dev/null 2>&1 || mv $@.tmp $@
	$(RM) $@.tmp*

# Build our dependencies, and then generate the constants and
# mach-types header files.  If we do it now, mkdep will pick
# the dependencies up later on when it runs through the other
# directories

dep:
	$(TOPDIR)/scripts/mkdep $(CFLAGS) $(EXTRA_CFLAGS) -- getconstants.c |\
	 sed s,getconstants.o,$(TOPDIR)/include/asm-arm/constants.h, > .depend
	$(MAKE) all

.PHONY:	all dep

ifneq ($(wildcard .depend),)
include .depend
endif