Project

General

Profile

RE: Driver Development Procedure » Makefile

david kasper, 11/19/2010 12:14 PM

 
1
#
2
# Sample out of tree build Makefile
3
# for the TARGET system
4
#
5
PWD = $(shell pwd)
6
ROOTDIR ?= $(KERNEL_ROOT)/..
7
KSRC = $(ROOTDIR)/$(LINUXDIR)
8
ARCH ?= arm
9
CROSS_COMPILE ?=arm-angstrom-linux-gnueabi-
10
MAKEARCH_KERNEL ?= $(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE)
11

    
12
#ifdef M
13
obj-m += gpio.o
14
#else
15
all:
16
	CFLAGS="" CPPFLAGS="" LDFLAGS="" \
17
	$(MAKEARCH_KERNEL) -C $(ROOTDIR)/$(LINUXDIR) M=$(PWD) modules
18
	$(MAKEARCH_KERNEL) -C $(ROOTDIR)/$(LINUXDIR) M=$(PWD) \
19
	INSTALL_MOD_PATH=$(ROOTDIR)/romfs DEPMOD=true modules_install
20
romfs:
21

    
22
clean:
23
	$(MAKEARCH_KERNEL) -C $(ROOTDIR)/$(LINUXDIR) M=$(PWD) clean
24

    
25
#endif
(1-1/2) Go to top
Add picture from clipboard (Maximum size: 1 GB)