swh:1:snp:c3bf2749e3476071fa748f67b0ffa2fdc5fe49d9
Raw File
Tip revision: 7cef5677ef3a8084f2588ce0a129dc95d65161f6 authored by Linus Torvalds on 06 June 2005, 15:22:29 UTC
Linux 2.6.12-rc6
Tip revision: 7cef567
mkmakefile
#!/bin/sh
# Generates a small Makefile used in the root of the output
# directory, to allow make to be started from there.
# The Makefile also allow for more convinient build of external modules

# Usage
# $1 - Kernel src directory
# $2 - Output directory
# $3 - version
# $4 - patchlevel


cat << EOF
# Automatically generated by $0: don't edit

VERSION = $3
PATCHLEVEL = $4

KERNELSRC    := $1
KERNELOUTPUT := $2

MAKEFLAGS += --no-print-directory

all:
	\$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT)

%::
	\$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) \$@

EOF

back to top