-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·31 lines (24 loc) · 987 Bytes
/
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
# To build modules outside of the kernel tree, we run "make"
# in the kernel source tree; the Makefile these then includes this
# Makefile once again.
# This conditional selects whether we are being included from the
# kernel Makefile or not.
ifeq ($(KERNELRELEASE),)
# Assume the source tree is where the running kernel was built
# You should set KERNELDIR in the environment if it's elsewhere
#KERNELDIR ?= ../../../../SPILinuxLegacy/linux-2.6.39
#KERNELDIR ?= ../../kernel/upstream/linux-2.6.39
KERNELDIR ?= ../../../../../kernel/work
# The current directory is passed to sub-makes as argument
PWD := $(shell pwd)
all:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
install:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install
clean:
rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions modules.* Module.*
.PHONY: modules clean
else
# called from kernel build system: just declare what our modules are
obj-m := lepton.o
endif