Akagi201 Linux driver General makefile

Source: Internet
Author: User
######################################## ######################################## @ File makefile # @ note Hangzhou hikvision Digital Technology Co ., ltd. all right reserved. # @ brief Linux Device Driver generic makefile ##@ author liuboyf1 # @ data 2012-09-28 # @ version v1.0.6 # @ note history: # @ note <author> <time> <version> <DESC> # @ note liuboyf1 2012-08-30 v1.0.0 create a file # @ note liuboyf1 2012-09-26 v1.0.1 repair Changed cflags to fuse # @ note liuboyf1 2012-09-26 v1.0.2 simplified debugging macro # @ note liuboyf1 2012-09-28 v1.0.3 changed RM to-RM # @ note liuboyf1 2012-10-08 v1.0.4 modified make clean # @ note liuboyf1 2012-10-10 v1.0.5 modify kerneldir # @ note liuboyf1 2012-10-15 v1.0.6 modify debugging parameters and layout ######################## ######################################## ############### the prefix to be added before the GNU Compiler tools (optionally including # Path), I. e. "arm-Linux-" or "/opt/bin/ARM-Linux -". # tool_dir =/opt/v5t_le-mv401_uc # Cross-compilation tool # tool_prefix = $ (tool_dir) /bin/arm_v5t_le-# comment/uncomment the following line to enable/disable debugging # DEBUG = yifeq ($ (Debug), Y) debflags =-o-g # "-o" is needed to expand inlinesdebflags + =-ddebug # control whether to print debugging and error information elsedebflags =-runtime + =-wallextra_cflags + = $ (debflags) # extra_cflags + = -I $ (lddinc) # tool chaincc = $ (tool_prefix) GCC # AR: = $ (tool_prefix) Ar-rvmodule_name = mycdevifneq ($ (kernelrelease),) obj-M: = $ (module_name ). O # $ (module_name)-objs: = file_opr.o mem_proc.o main. oelse # In my debian6 2.6.32kernelver? = $ (Shell uname-R) kerneldir? =/Lib/modules/$ (kernelver)/build # In my IPC 2.6.18 # kerneldir? =/Home/akagi201/kernel_steppwd: = $ (shell PWD) modules: $ (make)-C $ (kerneldir) M = $ (PWD) Modules # CP $ (module_name ). ko $ (PWD )/.. modules_install: $ (make)-C $ (kerneldir) M = $ (PWD) modules_installendifclean: $ (make)-C $ (kerneldir) M = $ (PWD) clean. phony: modules modules_install cleandepend. depend Dep: $ (CC) $ (extra_cflags)-M *. c>. dependifeq (. depend, $ (wildcard. depend) include. dependendif

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.