jme: Cleanup PM operations after using new PM API
[jme.git] / Makefile
CommitLineData
d7699f87 1MODNAME := jme
c97b5740 2obj-m := $(MODNAME).o
79ce639c 3
c97b5740
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
c97b5740
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 17
b49d52a1
GFT
18ifeq (,$(KVER))
19KVER=$(shell uname -r)
d7699f87 20endif
b49d52a1
GFT
21KSRC ?= /lib/modules/$(KVER)/build
22MINSTDIR ?= /lib/modules/$(KVER)/kernel/drivers/net
d7699f87 23
c97b5740 24all: modules
d7699f87 25 @rm -rf $(TEMPFILES)
c97b5740
GFT
26modules:
27 @$(MAKE) -C $(KSRC) M=$(shell pwd) modules
d7699f87 28
c97b5740
GFT
29checkstack: modules
30 objdump -d $(obj-m) | perl $(KSRC)/scripts/checkstack.pl $(shell uname -m)
cd0ff491
GFT
31 @rm -rf $(TEMPFILES)
32
c97b5740 33namespacecheck: modules
cd0ff491
GFT
34 perl $(KSRC)/scripts/namespace.pl
35 @rm -rf $(TEMPFILES)
36
c97b5740 37install: modules
b49d52a1 38 install -m 644 $(MODNAME).ko $(MINSTDIR)
3fa48e9f 39 depmod -a $(KVER)
c97b5740
GFT
40
41patch:
42 @/usr/bin/diff -uar -X dontdiff ../../trunc ./ > bc.patch || echo > /dev/null
43
28d4b5c6
GFT
44buildtest:
45 SRCDIRS=`find ~/linux-src -mindepth 1 -maxdepth 1 -type d -name 'linux-*' | sort -r -n`; \
46 for d in $${SRCDIRS}; do \
349f9de1 47 $(MAKE) clean && $(MAKE) -C . KSRC=$${d} modules; \
28d4b5c6
GFT
48 if [ $$? != 0 ]; then \
49 exit $$?; \
50 fi; \
51 done
349f9de1 52 $(MAKE) clean
28d4b5c6 53
d7699f87
GFT
54clean:
55 @rm -rf $(MODNAME).ko $(TEMPFILES)
56
c97b5740
GFT
57%::
58 $(MAKE) -C $(KSRC) M=`pwd` $@
59
60endif