forked from msasongko17/AMD_IBS_Toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (25 loc) · 844 Bytes
/
Makefile
File metadata and controls
34 lines (25 loc) · 844 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Copyright (c) 2015-2018 Advanced Micro Devices, Inc. All rights reserved.
#
# This file is made available under the Linux kernel's version of the GPLv2
# See driver/LICENSE for more licensing details.
ifneq ($(KERNELRELEASE),)
obj-m := ibs.o
ibs-y := ibs-core.o ibs-fops.o ibs-interrupt.o ibs-utils.o ibs-workarounds.o
EXTRA_CFLAGS += $(CFLAGS)
else
SKIP_PEDANTIC=1
SKIP_WEXTRA=1
include ../make/master.mk
BUILD_THESE=$(DRIVER_DIR)
KDIR ?= /lib/modules/$(shell uname -r)/build
CFLAGS+=-I$(CURDIR)/$(INCLUDE_DIR)
all:
ifneq (,$(findstring ccc-analyzer,$(CC)))
$(warning Cannot build the IBS Linux driver with scan-build. Linux kernel files fail during the scan.)
else
$(MAKE) -C $(KDIR) M=$$PWD CFLAGS="$(CFLAGS) -mcmodel=kernel -mno-red-zone -fno-common"
endif
clean:
$(MAKE) -C $(KDIR) M=$$PWD clean
rm -f $$PWD/*.ur-safe
endif