makefile

来自「linux 8139驱动 linux 8139驱动 linux 8139驱动」· 代码 · 共 29 行

TXT
29
字号
# Makefile for a basic kernel module

# ----------------------------------------------------------------------------------------------------
# This flag specifies access type to operation register on PCI ethernet chips.
# If you apply 8139/8139CP ethernet controller via cardbus interface on linux distribution Red Hat 7.3
# please turn on this macro.
# ----------------------------------------------------------------------------------------------------
#RTL_MEM_ACCESS = USE_IO_OPS
RTL_MEM_ACCESS = USE_MEM_OPS


# ----------------------------------------------------------------------------------------------------
# Please specify the include path according to your kernel.
# ----------------------------------------------------------------------------------------------------
NEW_INCLUDE_PATH = /usr/src/linux-2.4.20-8/include/

# ----------------------------------------------------------------------------------------------------
# GNU C compiler and its flags
# ----------------------------------------------------------------------------------------------------
CC=gcc
MODCFLAGS := -O6 -Wall -DCONFIG_KERNELD -DMODULE -D__KERNEL__ -DLINUX -D${RTL_MEM_ACCESS}



all: 8139too

8139too:	8139too.c /usr/include/linux/version.h
		$(CC) $(MODCFLAGS) -I$(NEW_INCLUDE_PATH) -c 8139too.c -o $@.o

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?