#
# SUSE specific makefile for the ndiswrapper kernel module (2.6 kernels)
# Andreas Gruenbacher, SUSE Labs, January 2004
#
KERNEL_SOURCE ?= /lib/modules/$(shell uname -r)/build

NDISWRAPPER_VERSION=1.2
EXTRA_VERSION=

CPPFLAGS += -DNDISWRAPPER_VERSION=\"$(NDISWRAPPER_VERSION)\" \
	    -DEXTRA_VERSION=\"$(EXTRA_VERSION)\"

# This module only works on x86.
ifeq ($(CONFIG_X86),y)
ifeq ($(CONFIG_USERMODE),)
obj-m := ndiswrapper.o 
ndiswrapper-objs := wrapper.o iw_ndis.o loader.o ntoskernel.o \
		    ndis.o misc_funcs.o proc.o pe_linker.o hal.o usb.o
ifeq ($(CONFIG_X86_64),y)
ndiswrapper-objs += x86_64_stubs.o
else
ndiswrapper-objs += divdi3.o
endif
endif
endif

# Set to something different to install somewhere else:
# MOD_DIR := extra

.PHONY: modules install clean modules_add

modules modules_add clean:
	$(MAKE) -C $(KERNEL_SOURCE) $@ SUBDIRS=$(CURDIR)

install : modules_add
