diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2016-02-28 14:50:47 +0100 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2016-02-28 14:50:47 +0100 |
commit | 631f0929c155087648acdd00ef0e2039737f8803 (patch) | |
tree | d3ac6f929a2cfcbc9cd5604c8d538adae71006c2 /driver/Makefile | |
parent | 30d740cc6accc3bd477e6bc924d5b74dad71ee6d (diff) | |
download | pcitool-631f0929c155087648acdd00ef0e2039737f8803.tar.gz pcitool-631f0929c155087648acdd00ef0e2039737f8803.tar.bz2 pcitool-631f0929c155087648acdd00ef0e2039737f8803.tar.xz pcitool-631f0929c155087648acdd00ef0e2039737f8803.zip |
Support emulation mode without real hardware
Diffstat (limited to 'driver/Makefile')
-rw-r--r-- | driver/Makefile | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/driver/Makefile b/driver/Makefile index c26a84a..a783c3f 100644 --- a/driver/Makefile +++ b/driver/Makefile @@ -1,3 +1,4 @@ +CONFIG_MODULE_SIG=n obj-m := pciDriver.o pciDriver-objs := base.o int.o umem.o kmem.o sysfs.o ioctl.o compat.o @@ -8,6 +9,12 @@ PWD := $(shell pwd) EXTRA_CFLAGS += -I$(M)/.. +ifdef DUMMY_DEVICE +ifneq ($(DUMMY_DEVICE), 0) + EXTRA_CFLAGS += -DPCIDRIVER_DUMMY_DEVICE +endif +endif + default: @KERNEL_GCC_VERSION=`cat /proc/version | head -n1 | cut -d " " -f 7` ;\ GCC_VERSION=`$(CC) --version | head -n 1 | tr ' ' '\n' | grep -e "[0-9]\+\.[0-9]" | tail -n 1` ;\ @@ -39,7 +46,7 @@ default: build_date=`date "+%Y/%m/%d %H:%M:%S"` ;\ build="Built at $$build_date by $$build_user" ;\ revision="Revision $$build_revision from $$build_branch by $$build_author at $$build_path, last modification from $$build_lastmod" ;\ - echo -e "#define PCIDRIVER_BUILD \"$$build\"\\n#define PCIDRIVER_REVISION \"$$revision\"\\n#define PCIDRIVER_CHANGES \"$$build_changes\"\\n" > build.h ;\ + /bin/echo -e "#define PCIDRIVER_BUILD \"$$build\"\\n#define PCIDRIVER_REVISION \"$$revision\"\\n#define PCIDRIVER_CHANGES \"$$build_changes\"\\n" > build.h ;\ $(MAKE) $(CFLAGS) -C $(KERNELDIR) M=$(PWD) CC=$$CC modules install: |