1 # if HW is PC_24 or PC_26 it compiles for kernel 2.4 resp 2.6
4 #---------- FOR PC 2.6 kernel -----------------------------------
6 ifneq ($(KERNELRELEASE),)
9 KDIR:=/lib/modules/$(shell uname -r)/build
10 INSTALLDIR:=/lib/modules/$(shell uname -r)/kernel/drivers/pci/hotplug
14 @echo "Warning: Compiling for 2.6: $(FOR26)"
15 $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
18 #---------- FOR PC 2.4 kernel -----------------------------------
22 KERNELDIR = -I/usr/src/kernel-headers-2.4.27-2-686/include/
23 CFLAGS = -Wall $(KERNELDIR) -O3 -D__KERNEL__ -DMODULE -c -DPC_KERNEL_24
27 @echo "Warning: Compiling for 2.4: $(FOR26)"
28 $(CC) $(CFLAGS) nozomi.c -c
29 $(CC) $(CFLAGS) kfifo.c -c
30 ld -r -o noz.o nozomi.o kfifo.o
32 #----------------------------------------------------------------
36 $(RM) *.o *.ko *.mod.* .*.o.cmd .*.mod.* .*.ko.cmd
37 $(RM) .tmp_versions -rf
38 #----------------------------------------------------------------
42 ctags-exuberant -e *.c
50 cp -f nozomi.ko $(INSTALLDIR)
52 #------------------------------------------------