There are several ways to go about this and which is appropriate depends on your goal.
If you only want to fool around with this one driver, it might be worth your while to cd into the driver source directory and build a Makefile for it that will compile the driver and only the driver.
If on the other hand, you plan to fiddle with the kernel, you will need to set up the kernel build system. While this is simplest from a user perspective, it will take a long time to run (depending on your processor, could be hours) and will use a lot of hard drive space (many GB probably). At the end, though, you will have your module compiled, and you don't have to install the rest of the kernel
To build the entire kernel, as root, cd into the source directory, and setup the build system:
cd /usr/src/kernel-5.5.15-3.mga7
make menuconfig
This will give you a menu for a default config of the kernel. step through the various options to turn on what you want turn on. Make sure the module you want is turned on and specified to be built as a module. Save this config.
Then execute the command:
make modules
And wait. After awhile, all your modules will be tuilt, including the one you want. You can then move that module into /lib/modules and load it into your kernel. Note that if you have specified a customversion for your kernel, you will have to load the kernel you build, in which case you can't do just a make modules, you have to do a make as well (make && make modules) to get everything.
If I were doing it, I would just compile the driver. The Makefile in the driver directory won't let you do that, so you have to build one that will. Don't discard the one that is there, rename it. I would do something like "mv Makefile Makefile.orig", then create my new Makefile.
I looked in that directory, and there are a lot of source files. I don't know if you need all of them for your driver; that is for you to figure out. But, here is a Makefile that you can use as a template that will compile a driver by itself, and give you a module that can be loaded into your running kernel:
MODULE_NAME = asix
SRC := asix_devices.c asix_common.c ax88172a.c
KDIR := /lib/modules/$(shell uname -r)/build
obj-m := $(MODULE_NAME).o
$(MODULE_NAME)-objs = $(SRC:.c=.o)
PWD := $(shell pwd)
EXTRA_CFLAGS += -I${PWD}/include
all:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
Obviously, this Makefile won't build your driver; it builds one that I modified extensively awhile back. However, this template is the one you need. Put your source files in here in place of the asix stuff and when you have it right your driver will build. From the existing Makefile in the directory I think you will wind up with 2 modules, cx23885.ko and altera-ci.ko
Truthfully, I have not built a linux kernel in a long time. Pretty much all the kernel work I do today is in freebsd, so I will tell you I am rusty at building linux.
But this should get you started, and should also provide you with enough fodder to find the details you need in google.