# 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

# ----------------------------------------------------------------------------------------------------
# Please specify the include path according to your kernel.
# ----------------------------------------------------------------------------------------------------
NEW_INCLUDE_PATH = /usr/src/linux-2.4.18-3/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
                                                     
.