| 71,8 → 71,9 |
| #**************************************************************************** |
| # where the driver should be installed - change here for cross install - currently not functional |
| # |
| INSTALL_LOCATION = /lib/modules/2.6.24-19-generic/ubuntu/misc/ |
| |
| INSTALL_LOCATION = /lib/modules/$(shell uname -r)/kernel/drivers/misc/ |
| |
| #**************************************************************************** |
| # get extracted kernel VERSION and PATCHLEVEL for comparison |
| # decide to use KBUILD for kernels greater 2.6.0 |
| 79,14 → 80,12 |
| # |
| KVERSION := $(shell echo $(VERSION) | sed -e 's;\([1-9]\)\..*;\1;g' ) |
| KPATCHLEVEL := $(shell echo $(VERSION) | sed -e 's;[1-9]\.\([0-9]\{0,3\}\)\..*;\1;g' ) |
| USEKBUILD := $(shell if [ $(KVERSION) -gt 2 ] || [ $(KVERSION) -eq 2 ] && [ $(KPATCHLEVEL) -ge 6 ] ; \ |
| then echo "yes" ; else echo "no" ; fi) |
| |
| USEKBUILD := yes |
| #**************************************************************************** |
| # some common switches and defines |
| # |
| DBG = __NO_DEBUG__ # or __DEBUG__ to debug the driver |
| #DBG = __DEBUG__ |
| SRC = . |
| |
| |
| 112,8 → 111,10 |
| #**************************************************************************** |
| # do it |
| # |
| KBUILD_CPPFLAGS += -D$(DBG) |
| |
| all : message |
| $(MAKE) -C $(KERNSRC) M=$(PWD) V=$(VERBOSE) $(filter-out all, $(MAKECMDGOLAS)) modules |
| $(MAKE) -C $(KERNSRC) M=$(PWD) V=$(VERBOSE) $(filter-out all, $(MAKECMDGOLAS)) modules |
| |
| else # <<<<< USEKBUILD >>>>>> |
| |
| 177,7 → 178,9 |
| @ echo "***" |
| |
| #********** root installation only ****************************************** |
| install: |
| install: |
| -rmmod pcivme |
| -cp -r pcivme.ko $(INSTALL_LOCATION) |
| ./pcivme_load 1 |
| |
| endif # <<<<< HASVERSION_H >>>>>> |