mtd/drivers/mtd Makefile-2.4,NONE,1.1 Makefile-2.5,NONE,1.1 defconfig,NONE,1.1 GNUmakefile,1.13,1.14 Makefile,1.72,1.73

David Woodhouse dwmw2 at infradead.org
Wed May 21 08:58:01 EDT 2003


Update of /home/cvs/mtd/drivers/mtd
In directory phoenix.infradead.org:/tmp/cvs-serv20560

Modified Files:
	GNUmakefile Makefile 
Added Files:
	Makefile-2.4 Makefile-2.5 defconfig 
Log Message:
Update to build in 2.5 too

***** Error reading new file: [Errno 2] No such file or directory: 'Makefile-2.4'
***** Error reading new file: [Errno 2] No such file or directory: 'Makefile-2.5'
***** Error reading new file: [Errno 2] No such file or directory: 'defconfig'
Index: GNUmakefile
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/GNUmakefile,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- GNUmakefile	14 May 2003 15:05:11 -0000	1.13
+++ GNUmakefile	21 May 2003 12:57:58 -0000	1.14
@@ -4,64 +4,28 @@
 
 ifndef VERSION
 
-# Someone just typed 'make'
-CONFIG_MTD_COMPLEX_MAPPINGS := y
-EXTRA_CFLAGS += -DCONFIG_MTD_COMPLEX_MAPPINGS=1
+# Someone just typed 'make'. Invoke the kernel makefiles properly...
 
 export CONFIG_MTD_COMPLEX_MAPPINGS EXTRA_CFLAGS
 
 modules:
-	make -C $(LINUXDIR) SUBDIRS=`pwd` EXTRA_CFLAGS=-DCONFIG_MTD_COMPLEX_MAPPINGS=1 modules
+	make -C $(LINUXDIR) SUBDIRS=`pwd` modules
+
+simplemap:
+	make -C $(LINUXDIR) SUBDIRS=`pwd` SIMPLEMAP=1 modules
 
 dep:
 	make -C $(LINUXDIR) SUBDIRS=`pwd` dep
 
 clean:
-	rm -f *.o */*.o
+	rm -f `find . -name \*.ko` `find . -name \*.o`
 
 else
 
+# 2.5 explicitly states <subdir>/Makefile rather than using recursive make,
+# so we handle all that in there...
 
-
-ifndef CONFIG_MTD
-
-# We're being invoked outside a normal kernel build. Fake it
-
-# We add to $CC rather than setting EXTRA_CFLAGS because the local 
-# header files _must_ appear before the in-kernel ones. 
-CC += -I$(shell pwd)/../../include
-
-CONFIG_MTD := m
-CONFIG_MTD_PARTITIONS := m
-CONFIG_MTD_REDBOOT_PARTS := m
-CONFIG_MTD_AFS_PARTS := m
-CONFIG_MTD_CHAR := m
-CONFIG_MTD_BLOCK := m
-CONFIG_FTL := m
-CONFIG_NFTL := m
-
-CFLAGS_nftlcore.o := -DCONFIG_NFTL_RW
-CFLAGS_nftlmount.o := -DCONFIG_NFTL_RW
-
-endif
-
-# Normal case - build in-kernel
-
-ifeq ($(VERSION),2)
- ifneq ($(PATCHLEVEL),4)
-  ifneq ($(PATCHLEVEL),5)
-   OLDTOPDIR := $(TOPDIR)
-   TOPDIR := $(shell pwd)
-  endif
- endif
-endif
-
-ifeq ($(VERSION),2)
- ifeq ($(PATCHLEVEL),0)
-   obj-y += initcalls.o
-  endif
-endif
-
+obj := $(shell pwd)
 include Makefile
 
 endif

Index: Makefile
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/Makefile,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -r1.72 -r1.73
--- Makefile	20 May 2003 13:10:03 -0000	1.72
+++ Makefile	21 May 2003 12:57:58 -0000	1.73
@@ -1,76 +1,25 @@
-#
-# Makefile for the memory technology device drivers.
-#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definitions are now inherited from the
-# parent makes..
-#
 # $Id$
 
-export-objs	:= mtdcore.o mtdpart.o redboot.o cmdlinepart.o afs.o mtdconcat.o
+# Munge the kernel build environment to suit our needs....
 
-nftl-objs	:= nftlcore.o nftlmount.o
-mtdblock-objs	:= mtdblock-core.o
+include $(obj)/defconfig
 
-BELOW25		:= $(shell echo $(PATCHLEVEL) | sed s/[1234]/y/)
+# This must be first in the include path, so it goes in $(CC) rather
+# then $(EXTRA_CFLAGS)
 
+CC += -I$(obj)/../../include
+EXTRA_CFLAGS := -g -DMTD_OUT_OF_TREE #-Werror
 
-#                       *** BIG UGLY NOTE ***
-#
-# The shiny new inter_module_xxx has introduced yet another ugly link
-# order dependency, which I'd previously taken great care to avoid.
-# We now have to ensure that the chip drivers are initialised before the
-# map drivers, and that the doc200[01] drivers are initialised before
-# docprobe.
-#
-# We'll hopefully merge the doc200[01] drivers and docprobe back into
-# a single driver some time soon, but the CFI drivers are going to have
-# to stay like that.
-#
-# Urgh.
-# 
-# dwmw2 21/11/0
-
-# Core functionality.
-obj-$(CONFIG_MTD)		+= mtdcore.o
-obj-$(CONFIG_MTD_CONCAT)	+= mtdconcat.o
-obj-$(CONFIG_MTD_PARTITIONS)	+= mtdpart.o
-obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o
-obj-$(CONFIG_MTD_CMDLINE_PARTS) += cmdlinepart.o
-obj-$(CONFIG_MTD_AFS_PARTS)	+= afs.o
-
-# 'Users' - code which presents functionality to userspace.
-obj-$(CONFIG_MTD_CHAR)		+= mtdchar.o
-obj-$(CONFIG_MTD_BLOCK)		+= mtdblock.o $(mtd_blkdevs)
-obj-$(CONFIG_MTD_BLOCK_RO)	+= mtdblock_ro.o $(mtd_blkdevs)
-obj-$(CONFIG_FTL)		+= ftl.o $(mtd_blkdevs)
-obj-$(CONFIG_NFTL)		+= nftl.o $(mtd_blkdevs)
-
-ifeq ($(BELOW25),y)
-obj-y           += chips/chipslink.o maps/mapslink.o \
-			devices/devlink.o nand/nandlink.o
-
-O_TARGET	:= mtdlink.o
-
-list-multi	:= nftl.o mtdblock.o
-
-mod-subdirs	:= 
-subdir-y	:= chips maps devices nand
-subdir-m	:= $(subdir-y)
-mtd_blkdevs	+= mtd_blkdevs-24.o
-else
-obj-y           += chips/ maps/ devices/ nand/
-mtd_blkdevs	+= mtd_blkdevs.o
+ifdef SIMPLEMAP
+EXTRA_CFLAGS += -DSIMPLEMAP
 endif
 
--include $(TOPDIR)/Rules.make
-
-# below 2.5 only
-ifeq ($(BELOW25),y)
-nftl.o: $(nftl-objs)
-	$(LD) -r -o $@ $(nftl-objs)
+# We know, but not quite yet...
+CFLAGS_nftlcore.o := -Wno-error
+CFLAGS_nftlmount.o := -Wno-error
 
+ifeq ($(PATCHLEVEL),5)
+include $(obj)/Makefile-2.5
+else
+include $(obj)/Makefile-2.4
 endif




More information about the linux-mtd-cvs mailing list