MOXA linux-2.6.x / linux-2.6.9-uc0 from sdlinux-moxaart.tgz
[linux-2.6.9-moxart.git] / drivers / char / nozomi / Makefile-bak.05222006
blobf7257d0b96e19545a36b9539baec0185e3fc2ed0
1 # if HW is PC_24 or PC_26 it compiles for kernel 2.4 resp 2.6
2 HW=PC_26
4 #---------- FOR PC 2.6 kernel -----------------------------------
5 ifeq ($(HW),PC_26)
6 ifneq ($(KERNELRELEASE),)
7 obj-m += nozomi.o
8 else
9 KDIR:=/lib/modules/$(shell uname -r)/build
10 PWD             := $(shell pwd)
12 default:
13         @echo "Warning: Compiling for 2.6: $(FOR26)"
14         $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
15 endif
16 endif
17 #---------- FOR PC 2.4 kernel -----------------------------------
18 ifeq ($(HW),PC_24)
19 #CC                     = gcc-2.95
20 CC                      = gcc-3.3
21 KERNELDIR       = -I/usr/src/kernel-headers-2.4.27-2-686/include/
22 CFLAGS          = -Wall $(KERNELDIR) -O3 -D__KERNEL__ -DMODULE -c -DPC_KERNEL_24
23 PWD                     := $(shell pwd)
25 default:
26         @echo "Warning: Compiling for 2.4: $(FOR26)"
27         $(CC) $(CFLAGS) nozomi.c -c
28         $(CC) $(CFLAGS) kfifo.c -c
29         ld -r -o noz.o nozomi.o kfifo.o
30 endif
31 #----------------------------------------------------------------
33 c: clean
34 clean:
35         $(RM) *.o *.ko *.mod.* .*.o.cmd .*.mod.* .*.ko.cmd
36         $(RM) .tmp_versions -rf
37 #----------------------------------------------------------------
38 t: tags
39 tags: ctags
40 ctags:
41         ctags-exuberant -e *.c
43 ser: ser.c
44         $(CC) ser.c -o ser