Newer
Older
# Makefile.host to make flxnet kernel modules flxnet_dev and flxnet_pcie
# based on generated makefile from https://gitlab.cern.ch/atlas-tdaq-felix/felix-tdaq-drivers/-/blob/main/rpm/SOURCES/pkgs/generate_dkms_makefile.py?ref_type=heads
#
# Execute command on host server
# cp Makefile.host Makefile

Nayib Boukadida
committed
KERNEL_VERSION := $(shell uname -r)
KERNEL_MODLIB := /lib/modules/$(KERNEL_VERSION)
KERNEL_SOURCES := $(shell test -d $(KERNEL_MODLIB)/source && echo $(KERNEL_MODLIB)/source || echo $(KERNEL_MODLIB)/build)
CPPFLAGS += -I$(PWD)/../flx -I$(PWD)/.. -DBUILD_64_BIT -DCOMPILE_DRIVER -DDRIVER_ERROR -DDRIVER_DEBUG -DRELEASE_NAME=\"${RELEASE_NAME}\" -DCVSTAG=\"$(CVSTAG)\"
EXTRA_CFLAGS := -I$(PWD)/../flx -I$(PWD)/.. -DBUILD_64_BIT -DCOMPILE_DRIVER -DDRIVER_ERROR -DDRIVER_DEBUG -DRELEASE_NAME=\"${RELEASE_NAME}\" -DCVSTAG=\"$(CVSTAG)\" -DCMEM_RCC_TAG=\"$(CMEM_RCC_TAG)\" -DIO_RCC_TAG=\"$(IO_RCC_TAG)\" -DFLX_TAG=\"$(FLX_TAG)\"
obj-m := flxnet_dev.o flxnet_pcie.o
KDIR := $(KERNEL_SOURCES)
PWD := $(shell pwd)
default:
$(MAKE) -C $(KDIR) M=$(PWD) modules
$(RM) *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions *.o.d *.mod