-
Notifications
You must be signed in to change notification settings - Fork 43
/
Makefile
58 lines (44 loc) · 1.05 KB
/
Makefile
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Makefile to build Homa as a Linux module.
ifneq ($(KERNELRELEASE),)
obj-m += homa.o
homa-y = homa_grant.o \
homa_incoming.o \
homa_metrics.o \
homa_offload.o \
homa_outgoing.o \
homa_peer.o \
homa_pool.o \
homa_plumbing.o \
homa_rpc.o \
homa_skb.o \
homa_sock.o \
homa_timer.o \
homa_utils.o \
timetrace.o
MY_CFLAGS += -g
ccflags-y += ${MY_CFLAGS}
CC += ${MY_CFLAGS}
else
ifneq ($(KERNEL_SRC),)
# alternatively to variable KDIR accept variable KERNEL_SRC as used in
# PetaLinux/Yocto for example
KDIR ?= $(KERNEL_SRC)
endif
KDIR ?= /lib/modules/$(shell uname -r)/build
all:
$(MAKE) -C $(KDIR) M=$(shell pwd) modules
install:
$(MAKE) -C $(KDIR) M=$(shell pwd) modules_install
check:
../homaLinux/scripts/kernel-doc -none *.c
clean:
$(MAKE) -C $(KDIR) M=$(shell pwd) clean
# The following targets are useful for debugging Makefiles; they
# print the value of a make variable in one of several contexts.
print-%:
@echo $* = $($*)
printBuild-%:
$(MAKE) -C $(KDIR) M=$(shell pwd) $@
printClean-%:
$(MAKE) -C $(KDIR) M=$(shell pwd) $@
endif