📄 makefile
字号:
### can4linux -- LINUX device driver Makefile## Copyright (c) 2004 port GmbH Halle/Saale## Used release tag for this software versionVERSION=3REL=3.4RELEASE=CAN4LINUX-$(VERSION)_$(REL)DVERSION=$(VERSION).$(REL)KVERSION= $(shell uname -r)CONFIG := $(shell uname -n)# be prepared for RTLinuxLINUXTARGET=LINUXOS#LINUXTARGET=RTLinuxCTAGS = ctags --c-types=dtvfCTAGS = elvtags -tsevlECHO = /bin/echoTITLE = LINUX driver module example ## The driver major device number# development starts with major=63# (LOCAL/EXPERIMENTAL USE)# The new linux/Documentation/devices.txt defines major=91CAN_MAJOR= 91CAN_MODULE = at91_uart.ko# location of the compiled objects and the final driver moduleOBJDIR = objDEFS = -DCAN_MAJOR=$(CAN_MAJOR) \ifneq ($(KERNELRELEASE),)EXTRA_CFLAGS = $(DEFS) -DVERSION=\"$(DVERSION)_$(TARGET)\"obj-m := t6936c.o# add other object modules hereuart-objs := at91_uart_core.o \ at91_uart_open.o \ at91_uart_close.o \ at91_uart_read.o \ at91_uart_write.o \ at91_uart_ioctl.o \ at91_uart.oelseKDIR :=/usr/src/arm/linux-2.6.16/PWD := $(shell pwd)all: @echo "compile with KDIR=$(KDIR)" $(MAKE) -C $(KDIR) M=$(PWD) TARGET=$(TARGET) modulesendifclean: -rm -f tags -rm -f *.o *.ko -rm -f .*.cmd *.mod.c -rm -rf .tmp_versions
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -