1#  Copyright (C) 2011  caoweigang <caoweigang@longcheer.net> <caowai@gmail.com>
2#
3#  This is free software; you can redistribute it and/or modify
4#  it under the terms of Version 2 of the GNU General Public License as
5#  published by the Free Software Foundation.
6
7# **********************************************************************
8# Foxconn Modified start
9# **********************************************************************
10#include ../config.mk
11
12KERNELPATH := $(LINUXDIR)
13#$(BASEDIR)/components/opensource/linux/linux-2.6.36
14KDIR := $(KERNELPATH)
15#for local build test
16#KDIR := /disk2/han/work2/R7000/0724_3g/components/opensource/linux/linux-2.6.36
17
18#CROSS_COMPILE=arm-brcm-linux-uclibcgnueabi-
19SRC_DIR :=$(shell pwd)
20EXTRA_CFLAGS += -DFX_HACK
21
22# **********************************************************************
23# Foxconn Modified end
24# **********************************************************************
25
26obj-m := lctserial.o
27
28#KDIR := /lib/modules/$(shell uname -r)/build
29#MODULE_DIR := /lib/modules/$(shell uname -r)/kernel/drivers/usb/serial/
30PWD := $(shell pwd)
31
32#default:
33	#$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
34all:
35	$(MAKE) -C $(KDIR) CROSS_COMPILE=$(CROSS_COMPILE) M=$(PWD) modules
36
37
38clean:
39	rm -rf *.mod.c *.o *.markers *.symvers *.order  *.ko .tmp_versions .*.cmd
40
41install:
42	#cp -f *.ko $(MODULE_DIR)
43	#depmod
44	$(STRIP) -S lctserial.ko
45	install -d $(TARGETDIR)/lib/modules/
46	install -m 755 lctserial.ko $(TARGETDIR)/lib/modules/
47
48uninstall:
49	#rm /lib/modules/$(shell uname -r)/kernel/drivers/usb/serial/lctserial.ko
50	#depmod
51	#rmmod lctserial 
52	
53	
54
55
56
57
58