INCLUDEDIR = /usr/include

CFLAGS = -D__KERNEL__ -DMODULE -DCLONE -D__NO_VERSION__ -DSINGLE_PACKET -D_DGE500T_ -DINTR_HOLDOFF -DMEMMAPPED_IO -D_DBG -D_DUMP -DPHY_INTR -DSTATISTICS -DASSERTION -O -Wall -I$(INCLUDEDIR) -g -w  

OBJS = dgem.o
all: $(OBJS)
dgem.o: sp.o hsm.o dge.o 
	$(LD) -r $^ -o $@ 

## Install the compiled driver into the system's module pool
install: dgem.o
	cp dgem.o /lib/modules/`uname -r`/net

## Reload the Networking stack and driver
init:
	sh /etc/rc.d/init.d/network stop
	insmod dgem.o
	sh /etc/rc.d/init.d/network start

## Reload the Networking stack and driver
reload:
	sh /etc/rc.d/init.d/network stop
	rmmod dgem
	insmod dgem.o
	sh /etc/rc.d/init.d/network start

clean:
	rm -f *.o *~ core
