Makefile

Php code posted
created at 01 Mar 13:40, updated at 01 Mar 13:40

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

# 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
    KERNELDIR = ~/sources/linux-3.2.6
    # The current directory is passed to sub-makes as argument
    PWD := $(shell pwd)

modules:
  $(MAKE) ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- -C $(KERNELDIR) M=$(PWD) modules

.PHONY: modules clean

else
    # called from kernel build system: just declare what our modules are
    obj-m := hello.o
endif
716 Bytes in 2 ms with coderay