guowenxue
2020-08-21 e9b63ad24536b3cd6e0b2721f2596e1bf9bccab7
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
#*********************************************************************************
#      Copyright:  (C) 2017 LingYun IoT Studio <www.iot-yun.com>
#                  All rights reserved.
#
#       Filename:  Makefile
#    Description:  This Makefile used to compile the driver for X86
#
#        Version:  1.0.0(10/08/2011~)
#                  Author:  Guo Wenxue <guowenxue@gmail.com>
#      ChangeLog:  1, Release initial version on "11/11/2011 01:29:33 PM"
#
#********************************************************************************/
 
KERNAL_DIR ?= /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
 
obj-m := kernel_hello.o
 
all: 
    $(MAKE) -C $(KERNAL_DIR) M=$(PWD) modules
    @make clear
 
clear: 
    @rm -f *.o *.cmd *.mod.c 
    @rm -rf  *~ core .depend  .tmp_versions Module.symvers modules.order -f 
    @rm -f .*ko.cmd .*.o.cmd .*.o.d .*.cmd *.unsigned
 
clean:
    @rm -f *.ko