Skip to content
Snippets Groups Projects
Commit b8e9a125 authored by Nayib Boukadida's avatar Nayib Boukadida
Browse files

Copied makefile from Pascal

parent ff638136
No related branches found
No related tags found
2 merge requests!2Flx 1886 flxnet driver wupper no error,!1Removed vmk180_serial_demo ip core, and use versal_network_device ip instead,...
#
#ifeq ($(KERNELRELEASE),)
#
# # Assume the source tree is where the running kernel was built
# # You should set KERNELDIR in the environment if it's elsewhere
#
# #BUILDSYSTEM_DIR ?= /lib/modules/$(shell uname -r)/build
# # The current directory is passed to sub-makes as argument
# #PWD := $(shell pwd)
#
#modules:
# $(MAKE) -C $(BUILDSYSTEM_DIR) M=$(PWD) KBUILD_EXTRA_SYMBOLS=$(EXTRA_SYMBOLS) modules
#
#modules_install:
# $(MAKE) -C $(BUILDSYSTEM_DIR) M=$(PWD) modules_install
#
#clean:
# rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions *.o.d *.mod
#
#.PHONY: modules modules_install clean
#
#else
# # called from kernel build system: just declare what our modules are
# obj-m := flxnet_dev.o flxnet_target.o flxnet_pcie.o
# flxnet_dev-y := flx_net_dev.o
# flxnet_target-y := flx_net_target.o
# flxnet_pcie-y := flx_net_pcie.o
#
#endif
ifeq ($(KERNELRELEASE),)
# Assume the source tree is where the running kernel was built
# You should set KERNELDIR in the environment if it's elsewhere
#BUILDSYSTEM_DIR ?= /lib/modules/$(shell uname -r)/build
# The current directory is passed to sub-makes as argument
#PWD := $(shell pwd)
modules:
$(MAKE) -C $(BUILDSYSTEM_DIR) M=$(PWD) KBUILD_EXTRA_SYMBOLS=$(EXTRA_SYMBOLS) modules
modules_install:
$(MAKE) -C $(BUILDSYSTEM_DIR) M=$(PWD) modules_install
clean:
rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions *.o.d *.mod
.PHONY: modules modules_install clean
# If we are running by kernel building system
ifneq ($(KERNELRELEASE),)
#$(TARGET_MODULE)-objs := main.o device_file.o
obj-m := flxnet_dev.o flxnet_target.o
# If we running without kernel build system
else
# called from kernel build system: just declare what our modules are
obj-m := flxnet_dev.o flxnet_target.o flxnet_pcie.o
flxnet_dev-y := flx_net_dev.o
flxnet_target-y := flx_net_target.o
flxnet_pcie-y := flx_net_pcie.o
BUILDSYSTEM_DIR:=/lib/modules/$(shell uname -r)/build
PWD:=$(shell pwd)
all :
# run kernel build system to make module
$(MAKE) -C $(BUILDSYSTEM_DIR) M=$(PWD) modules
clean:
# run kernel build system to cleanup in current directory
$(MAKE) -C $(BUILDSYSTEM_DIR) M=$(PWD) clean
load:
insmod ./flxnet_dev.ko
insmod ./flxnet_target.ko
unload:
rmmod ./flxnet_dev.ko
rmmod ./flxnet_target.ko
reload:
rmmod ./flxnet_dev.ko
rmmod ./flxnet_target.ko
insmod ./flxnet_dev.ko
insmod ./flxnet_target.ko
endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment