Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Makefile 869 B

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