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-2.6-denx
   PWD         := $(shell pwd)

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

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

----- Revision r1.2 - 05 Feb 2008 - 08:26 - MarkusKlotzbuecher
Copyright © 2002-2019 by DENX Software Engineering