-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (24 loc) · 1.11 KB
/
Copy pathMakefile
File metadata and controls
30 lines (24 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
DRIVER_SRC=dma_driver_interface.o dma_register.o dma_bram_conf.o dma_hardware_procedures.o tests/mockable_functions.o
ifeq ($(OUT_OF_TREE), y)
ifndef PETALINUX_BUILD
$(error Provide a path to the petalinux build directory)
endif
obj-m += dma_ctrl_driver.o
dma_ctrl_driver-objs := $(DRIVER_SRC)
export ARCH=arm64
export CROSS_COMPILE=aarch64-xilinx-linux-
export PATH := $(PETALINUX_BUILD)/tmp/work/zynqmp_generic_xczu9eg-xilinx-linux/linux-xlnx/6.6.40+git/recipe-sysroot-native/usr/bin/aarch64-xilinx-linux/:$(PATH)
KERNEL_PATH="$(PETALINUX_BUILD)/tmp/work/zynqmp_generic_xczu9eg-xilinx-linux/linux-xlnx/6.6.40+git/linux-zynqmp_generic_xczu9eg-standard-build/"
all:
make -C ${KERNEL_PATH} M=$(PWD) modules
clean:
make -C ${KERNEL_PATH} M=$(PWD) clean
else
TEST_SRC=tests/dma_bram_tests.o tests/dma_register_tests.o tests/dma_tests.o
ccflags-$(CONFIG_DMA_PLATFORM_DRIVER) += -Werror=undef
obj-$(CONFIG_DMA_PLATFORM_DRIVER) += dma_ctrl_driver.o
dma_ctrl_driver-objs := $(DRIVER_SRC)
ccflags-$(CONFIG_DMA_PLATFORM_DRIVER_TEST) += -Werror=undef
obj-$(CONFIG_DMA_PLATFORM_DRIVER_TEST) += dma_tests.o
dma_tests-objs := $(TEST_SRC)
endif