📄 makefile-at9263
字号:
# can4linux -- LINUX device driver Makefile# Copyright (c) 2008 port GmbH Halle/Saale# Used release tag for this software versioninclude $(PWD)/version.inc## The driver major device number# The new linux/Documentation/devices.txt defines major=91 for CANCAN_MAJOR= 91CAN_MODULE = can.koTARGET=ATMEL_SAM9# location of the compiled objects and the final driver moduleOBJDIR = obj# Debugging Code within the driver# to use the Debugging option# and the Debugging control via /proc/sys/Can/DbgMask# the Makefile in subdir Can must called with the DEBUG set to# DEBUG=1# else# NODEBUG# doesn't compile any debug code into the driverDEBUG=NODEBUGDEBUG=DEBUG=1# all definitions for compiling the sources# CAN_PORT_IO - use port I/O instead of memory I/O# CAN_INDEXED_PORT_IO - CAN registers adressed by a pair of registers# one is selcting the register the other one does i/O# used eg. on Elan CPUs# CAN4LINUX_PCI# IODEBUG - all register write accesses are logged# CONFIG_TIME_MEASURE=1 - enable Time measurement at parallel port## MAX_CHANNELS - max number of minor inodes supported## CAN_MAX_OPEN - the driver can be opened more than once# the number specifies the number of possible# different process, the number of RX queues# the driver has to handle## ATMEL AT91SAM9263-EX Board (Y4 50 Mhz)# DEFS = -D$(TARGET) -D$(DEBUG) -DDEFAULT_DEBUG -DCAN_MAJOR=$(CAN_MAJOR) \ -DCAN_SYSCLK=100 \ -DMAX_CHANNELS=1 \ -DCAN_MAX_OPEN=2 \ -Wno-undef #-DCONFIG_TIME_MEASURE=1EXTRA_CFLAGS = $(DEFS) -DVERSION=\"$(DVERSION)_$(TARGET)\"PWD := $(shell pwd)obj-m := can.o# add other object modules herecan-objs:= core.o \ open.o \ read.o \ write.o \ ioctl.o \ select.o \ debug.o \ error.o \ util.o \ sysctl.o \ async.o \ close.o \ at9263funcs.o.PHONY: allall: @echo "CURDIR = $(CURDIR)" @echo "CC = $(CC)" test ! -d $(KDIR) || $(MAKE) -C $(KDIR) M=$(PWD) TARGET=$(TARGET) modulesclean: test ! -d $(KDIR) || $(MAKE) -C $(KDIR) M=$(PWD) TARGET=$(TARGET) clean#install:# cp can.ko # -mknod /dev/can0 c $(CAN_MAJOR) 0# chmod 666 /dev/can0inode: @ echo "mknod /dev/can0 c 91 0"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -