Commit cc34a5ff authored by Federico Vaga's avatar Federico Vaga

sw:drv: create kbuild file

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 09a797a3
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
# add versions of supermodule. It is useful when fine-delay-sw is included as sub-module
# of a bigger project that we want to track
ifdef CONFIG_SUPER_REPO
ifdef CONFIG_SUPER_REPO_VERSION
SUBMODULE_VERSIONS += MODULE_INFO(version_$(CONFIG_SUPER_REPO),\"$(CONFIG_SUPER_REPO_VERSION)\");
endif
endif
# For this CSM_VERSION, please see ohwr.org/csm documentation
ifdef CONFIG_CSM_VERSION
ccflags-y += -D"CERN_SUPER_MODULE=MODULE_VERSION(\"$(CONFIG_CSM_VERSION)\")"
else
ccflags-y += -DCERN_SUPER_MODULE=""
endif
ccflags-y += -DGIT_VERSION=\"$(GIT_VERSION)\"
ccflags-y += -I$(src)
ifeq ($(DKMS), 0)
ccflags-y += -I$(src)/../include
endif
ccflags-$(CONFIG_TRTL_DEBUG) += -DDEBUG
subdirs-ccflags-y = $(ccflags-y)
obj-m := mockturtle.o
mockturtle-y := mockturtle-core.o
mockturtle-y += mockturtle-cpu.o
mockturtle-y += mockturtle-hmq.o
mockturtle-y += mockturtle-tty.o
mockturtle-y += mockturtle-dbg.o
mockturtle-y += mockturtle-dbg.o
mockturtle-y += mockturtle-compat.o
......@@ -14,36 +14,8 @@ DKMS ?= 0
GIT_VERSION = $(shell cd $(src); git describe --always --dirty --long --tags)
VERSION:= $(shell git describe --tags --abbrev=0 | tr -d 'v')
# For this CSM_VERSION, please see ohwr.org/csm documentation
ifdef CONFIG_CSM_VERSION
ccflags-y += -D"CERN_SUPER_MODULE=MODULE_VERSION(\"$(CONFIG_CSM_VERSION)\")"
else
ccflags-y += -DCERN_SUPER_MODULE=""
endif
ccflags-y += -DGIT_VERSION=\"$(GIT_VERSION)\"
ccflags-y += -I$(src)
ifeq ($(DKMS), 0)
ccflags-y += -I$(src)/../include
endif
ccflags-$(CONFIG_TRTL_DEBUG) += -DDEBUG
subdirs-ccflags-y = $(ccflags-y)
obj-m := mockturtle.o
mockturtle-y := mockturtle-core.o
mockturtle-y += mockturtle-cpu.o
mockturtle-y += mockturtle-hmq.o
mockturtle-y += mockturtle-tty.o
mockturtle-y += mockturtle-dbg.o
mockturtle-y += mockturtle-dbg.o
mockturtle-y += mockturtle-compat.o
all modules: hw_header
$(MAKE) -C $(LINUX) M=$(shell /bin/pwd) modules
$(MAKE) -C $(LINUX) M=$(shell /bin/pwd) DKMS=$(DKMS) modules
hw_header:
ifeq ($(DKMS), 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment