RE: Driver Development Procedure » Makefile
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
|