Skip to content

Commit

Permalink
fix Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
free5gc-org committed Jan 29, 2022
1 parent b4eb107 commit 5cbccff
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ PWD := $(shell pwd)

CONFIG_MODULE_SIG=n
MODULE_NAME = gtp5g
MOD_KERNEL_PATH := kernel/drivers/net

ifeq ($(KVER),)
KVER := $(shell uname -r)
endif

ifeq ($(KDIR),)
KDIR := /lib/modules/$(KVER)/build
endif

ifneq ($(RHEL8FLAG),)
INSTALL := $(MAKE) -C $(KDIR) M=$$PWD INSTALL_MOD_PATH=$(DESTDIR) INSTALL_MOD_DIR=$(MOD_KERNEL_PATH) modules_install
Expand All @@ -16,28 +25,18 @@ else
RUN_DEPMOD := true
endif

ifeq ($(KVER),)
KVER := $(shell uname -r)
endif

ifneq ($(RUN_DEPMOD),)
DEPMOD := /sbin/depmod -a
else
DEPMOD := true
endif

ifeq ($(KDIR),)
KDIR := /lib/modules/$(KVER)/build
endif

MY_CFLAGS += -g -DDEBUG $(RHEL8FLAG)
EXTRA_CFLAGS += -Wno-misleading-indentation -Wuninitialized
CC += ${MY_CFLAGS}

obj-m := $(MODULE_NAME).o

MOD_KERNEL_PATH := kernel/drivers/net

default: module

module:
Expand Down

0 comments on commit 5cbccff

Please sign in to comment.