Skip to content

Commit

Permalink
trying another var
Browse files Browse the repository at this point in the history
  • Loading branch information
ampledata committed Nov 2, 2024
1 parent df5881d commit 04e605a
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,30 +32,31 @@

# To pass the dkms.conf parameters to the Makefile,
# add KVER and BASEDIR to the Make command line
KFLAG := 2$(shell "${KVER}" | sed -ne 's/^2\.[4]\..*/4/p')x
KFLAG := 2$(shell "$KVER" | sed -ne 's/^2\.[4]\..*/4/p')x
BSRC ?= /lib/modules/$(shell uname -r)
KVERSION := $(shell uname -r)

all: clean modules install

modules:
ifeq ($(KFLAG),24x)
$(MAKE) -C src/ KVER=$(KVER) BASEDIR=$(BSRC) -f Makefile_linux24x modules
$(MAKE) -C src/ KVER=$(KVERSION) BASEDIR=$(BSRC) -f Makefile_linux24x modules
else
$(MAKE) -C src/ KVER=$(KVER) BASEDIR=$(BSRC) modules
$(MAKE) -C src/ KVER=$(KVERSION) BASEDIR=$(BSRC) modules
endif

clean:
ifeq ($(KFLAG),24x)
$(MAKE) -C src/ KVER=$(KVER) BASEDIR=$(BSRC) -f Makefile_linux24x clean
$(MAKE) -C src/ KVER=$(KVERSION) BASEDIR=$(BSRC) -f Makefile_linux24x clean
else
$(MAKE) -C src/ KVER=$(KVER) BASEDIR=$(BSRC) clean
$(MAKE) -C src/ KVER=$(KVERSION) BASEDIR=$(BSRC) clean
endif

install: modules
ifeq ($(KFLAG),24x)
$(MAKE) -C src/ KVER=$(KVER) BASEDIR=$(BSRC) -f Makefile_linux24x install
$(MAKE) -C src/ KVER=$(KVERSION) BASEDIR=$(BSRC) -f Makefile_linux24x install
else
$(MAKE) -C src/ KVER=$(KVER) BASEDIR=$(BSRC) install
$(MAKE) -C src/ KVER=$(KVERSION) BASEDIR=$(BSRC) install
endif

package: modules
Expand Down

0 comments on commit 04e605a

Please sign in to comment.