DENX . Training2 . LddKernelMakefiles

5.2.3. Linux kernel makefiles

Makefile:

#
# Slightly more advanced Makefile for building the hello world module
#

ifneq ($(KERNELRELEASE),)
      obj-m       := hello.o
else
   KDIR        := /home/mk/git/linux-denx
   PWD         := $(shell pwd)

default:
   $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
endif

clean:
   rm -rf .*.cmd .tmp* *.ko *~ *.o *.mod.c *.symvers

----- Revision r1.3 - 22 Jul 2011 - 08:14 - WolfgangDenk
Copyright © 2002-2020 by DENX Software Engineering