From 631f0929c155087648acdd00ef0e2039737f8803 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Sun, 28 Feb 2016 14:50:47 +0100 Subject: Support emulation mode without real hardware --- driver/Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'driver/Makefile') 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: -- cgit v1.2.3