#
# Makefile for the Linux WWAN device drivers.
#
# NOTE: This make file can serve as both an external Makefile (launched
#       directly by the user), or as the sub-dir Makefile used by the kernel
# 	build system.

# If CONFIG_HSO isn't set, we'll assume the user has never configured
# their kernel to include this module and set up some defaults.
#
# NOTE: If you have previously added the HSO project to your kernel 
# 	and configured it for inclusion, these settings will be 
#	overridden by your kernel configuration.
ifndef ARCH
ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
CROSS_COMPILE ?=
else
CROSS_COMPILE := $(ARCH)-linux-gnu-
endif

list-m :=
list-m += hso
obj-m += hso.o

PWD=$(shell pwd)

MYPARMS := -C $(LINUXDIR) M=$(PWD) CROSS_COMPILE=$(CROSS_COMPILE) ARCH=$(ARCH)
EXTRA_CFLAGS := -DMOD_PACKAGE_VERSION=\"$(PACKAGE_VERSION)\"

all: modules

modules:
	$(MAKE) $(MYPARMS) modules

clean:
	$(MAKE) $(MYPARMS) clean

