jme: Support WoL after shutdown
[jme.git] / Makefile
CommitLineData
d7699f87 1MODNAME := jme
7ca9ebee 2obj-m := $(MODNAME).o
79ce639c 3
7ca9ebee
GFT
4ifneq ($(KERNELRELEASE),)
5#########################
6# kbuild part of makefile
7#########################
79ce639c 8EXTRA_CFLAGS += -Wall -O3
cd0ff491
GFT
9#EXTRA_CFLAGS += -DTX_DEBUG
10#EXTRA_CFLAGS += -DREG_DEBUG
d7699f87 11
7ca9ebee
GFT
12else
13#########################
14# Normal Makefile
15#########################
16TEMPFILES := $(MODNAME).o $(MODNAME).mod.c $(MODNAME).mod.o Module.symvers .$(MODNAME).*.cmd .tmp_versions modules.order Module.markers Modules.symvers
d7699f87
GFT
17
18ifeq (,$(BUILD_KERNEL))
19BUILD_KERNEL=$(shell uname -r)
20endif
cd0ff491 21KSRC ?= /lib/modules/$(BUILD_KERNEL)/build
d7699f87 22
7ca9ebee 23all: modules
d7699f87 24 @rm -rf $(TEMPFILES)
7ca9ebee
GFT
25modules:
26 @$(MAKE) -C $(KSRC) M=$(shell pwd) modules
d7699f87 27
7ca9ebee
GFT
28checkstack: modules
29 objdump -d $(obj-m) | perl $(KSRC)/scripts/checkstack.pl $(shell uname -m)
cd0ff491
GFT
30 @rm -rf $(TEMPFILES)
31
7ca9ebee 32namespacecheck: modules
cd0ff491
GFT
33 perl $(KSRC)/scripts/namespace.pl
34 @rm -rf $(TEMPFILES)
35
7ca9ebee
GFT
36install: modules
37 $(MAKE) -C $(KSRC) M=`pwd` modules_install
38
3b70a6fa 39patch:
0ede469c 40 @/usr/bin/diff -uar -X dontdiff ../../trunc ./ > bc.patch || echo > /dev/null
3b70a6fa 41
d7699f87
GFT
42clean:
43 @rm -rf $(MODNAME).ko $(TEMPFILES)
44
7ca9ebee
GFT
45%::
46 $(MAKE) -C $(KSRC) M=`pwd` $@
47
48endif