# Comment/uncomment the following line to disable/enable debugging
KERNEL_VERSION = 2.6.24.7
DEBUG = n

# Add your debugging flag (or not) to CFLAGS
MODULENAME=VIAUSBModem

ifeq ($(DEBUG),y)
  DEBFLAGS = -O -g -DVIA_DEBUG # "-O" is needed to expand inlines
else
  DEBFLAGS = -O2
endif

#CFLAGS += $(DEBFLAGS) -D__VIA_KVER_EQ_2615__
EXTRA_CFLAGS+= -I.. $(DEBFLAGS) -D__VIA_KVER_EQ_2620__

#ifneq ($(KERNELRELEASE),)
# call from kernel build system
obj-m	:=$(MODULENAME).o
$(MODULENAME)-objs := init.o
#else

#KERNELDIR ?= /lib/modules/$(shell uname -r)/build
#KERNELDIR ?= /home/guan/2.6-kernel
#PWD       := $(shell pwd)
#default:
#	@$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
all:
	make -C  modules

clean:
	rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions
#endif
