File: Makefile

package info (click to toggle)
linux-wlan-ng 0.2.9%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 2,732 kB
  • ctags: 3,973
  • sloc: ansic: 33,440; sh: 2,046; makefile: 802; python: 493; perl: 144
file content (36 lines) | stat: -rw-r--r-- 939 bytes parent folder | download | duplicates (4)
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
CURR_DIR :=$(shell pwd)

export CURR_DIR

.PHONY: get_version

all: clean get_version get_options 

get_version:
	@if [ ! -d $(KERNEL_SOURCE)/ ]; then \
		echo "";\
		echo "$(KERNEL_SOURCE) directory does not exist. Please edit the file 'config'";\
		echo "in this directory and set KERNEL_SOURCE to the correct location of your ";\
		echo "kernel source.";\
		echo "";\
		echo "You are currently running kernel version `uname -r`, the source code should";\
		echo "be for this version.";\
		echo "";\
		exit 1;\
	fi
	@if [ ! -f $(KERNEL_SOURCE)/include/linux/version.h ]; then \
		echo "$(KERNEL_SOURCE)/include/linux/version.h is missing. Please run make config";\
		echo "in your kernel source tree";\
		exit 1;\
	fi

	$(CC) -I$(KERNEL_SOURCE)/include get_version.c -o get_version

get_options:
	$(MAKE) -f $(CURR_DIR)/Makefile.get_options -C $(KERNEL_SOURCE) get_version_target

clean:
	$(RM) get_version make.opts 

distclean: clean