⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 makefile

📁 ADTEK RTK8189C Linux 2.4.X Driver
💻
字号:
#!/usr/bin/make all
# Makefile for building updated Linux PCI network device drivers as modules.
# $id$

# PREFIX may be set by the RPM build to set the effective root.
PREFIX=
PCMCIA=/usr/src/pcmcia/include
CC=gcc

ifeq ($(KERNVER),)
MODULEDIR=$(PREFIX)/lib/modules/`uname -r`
LINUX=/usr/src/linux
else
MODULEDIR=$(PREFIX)/lib/modules/$(KERNVER)
LINUX=/usr/src/linux-$(KERNVER)
endif

CFLAGS = -DMODULE -D__KERNEL__  -I$(LINUX)/include -O -Wall -Wstrict-prototypes

# Work around Red Hat 7.0 lossage.
ifneq ($(wildcard /usr/bin/kgcc),)
  CC=kgcc
endif

# If the modversion.h file exists we should pass a flag.
# Most of my drivers have been updated to not need this, but not the other
# kernel source files.

# If you are using Mandrake 8.0 and you have problems when insmod the driver,
# please remove "-DMODVERSIONS" option from makefile. 
MODVER_H = $(LINUX)/include/linux/modversions.h
ifneq ($(wildcard $(MODVER_H)),)
  CFLAGS += -DMODVERSIONS
endif

DRV_OFILES = RTK8189C.o

OFILES= $(DRV_OFILES) pci-scan.o

all: pci-scan.o $(DRV_OFILES)

$(OFILES) pci-scan.o: pci-scan.h kern_compat.h

pci-scan.o: pci-scan.h

install: $(OFILES)
	install -m 444 pci-scan.o $(DRV_OFILES) $(MODULEDIR)/net/
	@if [ -r cb_shim.o ]; then install -m 444 cb_shim.o $(MODULEDIR)/pcmcia/; fi
	@if [ "$(PREFIX)" = "" ]; then /sbin/depmod -a $(KERNVER);\
	else echo " *** Run '/sbin/depmod -a' to update the module database.";\
	fi

clean:
	-rm -f *.o 

⌨️ 快捷键说明

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