Kbuild 1.58 KB
Newer Older
1 2

KBUILD_EXTRA_SYMBOLS := \
3 4
	$(ZIO_ABS)/Module.symvers \
	$(FMC_BUS_ABS)/kernel/Module.symvers
5

6 7 8 9 10
# 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)\");
11
endif
12 13 14 15 16 17 18
endif
# add versions of used submodules
SUBMODULE_VERSIONS += MODULE_INFO(version_fmc_bus,\"$(FMC_BUS_VERSION)\");
SUBMODULE_VERSIONS += MODULE_INFO(version_zio,\"$(ZIO_VERSION)\");

ccflags-y += -DADDITIONAL_VERSIONS="$(SUBMODULE_VERSIONS)"

19 20
# The library includes <sdb.h>, so point -I directtly there
# include our header before to avoid conflicts with the kernel
21
LINUXINCLUDE := -I$(FMC_BUS_ABS)/kernel/include -I$(FMC_BUS_ABS)/kernel/include/linux $(LINUXINCLUDE)
22 23

ccflags-y += \
24 25
	-I$(ZIO_ABS)/include \
	-I$(FMC_BUS_ABS) \
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
	-I$(src)

ccflags-y += -DGIT_VERSION=\"$(GIT_VERSION)\"
#ccflags-y += -DDEBUG

# Extract ZIO minimum compatible version
ccflags-y += -D__ZIO_MIN_MAJOR_VERSION=$(shell echo $(ZIO_VERSION) | cut -d '-' -f 2 | cut -d '.' -f 1; )
ccflags-y += -D__ZIO_MIN_MINOR_VERSION=$(shell echo $(ZIO_VERSION) | cut -d '-' -f 2 | cut -d '.' -f 2; )

subdirs-ccflags-y = $(ccflags-y)

obj-m := fmc-fine-delay.o

fmc-fine-delay-objs	=  fd-zio.o fd-irq.o fd-core.o
fmc-fine-delay-objs	+= onewire.o spi.o i2c.o gpio.o
fmc-fine-delay-objs	+= acam.o calibrate.o pll.o time.o
fmc-fine-delay-objs	+= calibration.o fmc-util.o
Adam Wujek's avatar
Adam Wujek committed
43 44
fmc-fine-delay-objs	+= fmc-bus-link/sdb-lib/access.o
fmc-fine-delay-objs	+= fmc-bus-link/sdb-lib/glue.o