mtd/fs/jffs2 Makefile.common,NONE,1.1 Makefile,1.38,1.39
GNUmakefile,1.7,1.8
David Woodhouse
dwmw2 at infradead.org
Tue May 27 05:34:44 EDT 2003
Update of /home/cvs/mtd/fs/jffs2
In directory phoenix.infradead.org:/tmp/cvs-serv5712
Modified Files:
Makefile GNUmakefile
Added Files:
Makefile.common
Log Message:
Makefile cleanups
***** Error reading new file: [Errno 2] No such file or directory: 'Makefile.common'
Index: Makefile
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/Makefile,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- Makefile 26 May 2003 09:39:02 -0000 1.38
+++ Makefile 27 May 2003 09:34:41 -0000 1.39
@@ -1,40 +1,18 @@
#
-# Makefile for the linux Journalling Flash FileSystem (JFFS) routines.
+# Out of tree fs/jffs2/Makefile
#
# $Id$
-#
-# 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 in the main makefile...
-
-
-obj-$(CONFIG_JFFS2_FS) := jffs2.o
-
-COMPR_OBJS := compr.o compr_rubin.o compr_rtime.o compr_zlib.o
-JFFS2_OBJS := dir.o file.o ioctl.o nodelist.o malloc.o \
- read.o nodemgmt.o readinode.o write.o scan.o gc.o \
- symlink.o build.o erase.o background.o fs.o writev.o
-
-BELOW25 := $(shell echo $(PATCHLEVEL) | sed s/[1234]/y/)
-
-ifeq ($(BELOW25),y)
-LINUX_OBJS := super-v24.o crc32.o rbtree.o
-else
-LINUX_OBJS := super.o
-endif
-NAND_OBJS-$(CONFIG_JFFS2_FS_NAND) := wbuf.o
+include $(mtd)/defconfig
-jffs2-objs := $(COMPR_OBJS) $(JFFS2_OBJS) $(VERS_OBJS) $(NAND_OBJS-y) \
- $(LINUX_OBJS)
+# This must be first in the include path, so it goes in $(CC) rather
+# then $(EXTRA_CFLAGS)
+CC += -I$(mtd)/../../include
+EXTRA_CFLAGS := -g -DMTD_OUT_OF_TREE -Werror
-# 2.4 build compatibility
-ifeq ($(BELOW25),y)
-obj-y := $(jffs2-objs)
-O_TARGET := jffs2.o
-include $(TOPDIR)/Rules.make
+ifdef NONAND
+EXTRA_CFLAGS += -DNONAND
endif
+include $(obj)/Makefile.common
Index: GNUmakefile
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/GNUmakefile,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- GNUmakefile 14 May 2003 20:26:30 -0000 1.7
+++ GNUmakefile 27 May 2003 09:34:41 -0000 1.8
@@ -1,49 +1,29 @@
-# GNUmakefile for JFFS2 build outside kernel tree
# $Id$
LINUXDIR=/lib/modules/$(shell uname -r)/build
ifndef VERSION
-# Someone just typed 'make' in this directory.
-# Invoke a kernel build process, with only this dir in SUBDIRS.
+
+# Someone just typed 'make'. Invoke the kernel makefiles properly...
modules:
- $(MAKE) -C $(LINUXDIR) CONFIG_JFFS2_FS_NAND=y SUBDIRS=`pwd` modules
+ make -C $(LINUXDIR) SUBDIRS=`pwd` mtd=`pwd` modules
nonand:
- make -C $(LINUXDIR) SUBDIRS=`pwd` modules
+ make -C $(LINUXDIR) SUBDIRS=`pwd` mtd=`pwd` NONAND=1 modules
dep:
- make -C $(LINUXDIR) SUBDIRS=`pwd` dep
+ make -C $(LINUXDIR) SUBDIRS=`pwd` mtd=`pwd` dep
clean:
- rm -f *.o
+ rm -f `find . -name \*.ko` `find . -name \*.o`
else
-ifndef CONFIG_JFFS2_FS
-# Invoked from a kernel build tree, but CONFIG_JFFS2_FS isn't set.
-# That means we must have got here from the hack above - pretend
-# CONFIG_JFFS2_FS _was_ set so that we actually build it, and also
-# pull in the local MTD include files in case they're also newer than
-# the ones in the kernel tree. And turn on debugging.
-
-CC += -I$(shell pwd)/../../include
-
-CONFIG_JFFS2_FS := m
-EXTRA_CFLAGS += -DCONFIG_JFFS2_FS_DEBUG=1 -g -Werror
-
-ifeq ($(CONFIG_JFFS2_FS_NAND),y)
-EXTRA_CFLAGS += -DCONFIG_JFFS2_FS_NAND=1
-endif
-endif
-
-# Check whether we've put the JFFS2 stuff in the superblock and inode unions
-OUT_OF_KERNEL_CFLAGS := $(shell grep -q jffs2 $(TOPDIR)/include/linux/fs.h || echo "-DJFFS2_OUT_OF_KERNEL")
-EXTRA_CFLAGS += $(OUT_OF_KERNEL_CFLAGS)
-
+# 2.5 explicitly states <subdir>/Makefile rather than using recursive make,
+# so we handle all that in there...
+obj := $(shell pwd)
include Makefile
--include $(TOPDIR)/Rules.make
endif
More information about the linux-mtd-cvs
mailing list