
CC=gcc -c
ARCH=$(shell uname -m | sed s/i.86/i86/)

ifeq	($(ARCH),i86)
OPTS=-DMODULE -D__KERNEL__ -D__SMP__ -DMODVERSIONS -Wall \
-Wstrict-prototypes -O2 \
-fomit-frame-pointer -pipe -m486 -I/usr/src/linux/include
else
OPTS=-DMODULE -D__KERNEL__ -D__SMP__ -DMODVERSIONS -Wall \
-Wstrict-prototypes -O2 \
-fomit-frame-pointer -pipe -I/usr/src/linux/include -ffixed-8
endif

OPTS2=

all: module

module : mxser.o

install: module
	cp mxser.o /lib/modules/$(shell uname -r)/misc/

clean :
	rm -f *.o

mxser.o : mxser.c
	$(CC) $(OPTS) mxser.c

dummy:
