summaryrefslogtreecommitdiff
path: root/common.mk
AgeCommit message (Collapse)Author
2010-09-28mtd-utils: Use $(CURDIR) in place of $(PWD)Kevin Cernekee
$(PWD) comes from the shell and may cause unexpected side effects when using "make -C". $(CURDIR) is defined internally by GNU make. Signed-off-by: Kevin Cernekee <cernekee@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2010-07-13mtd-utils: move libmtd source files to lib/ subdirectoryKevin Cernekee
Source files for libmtd, crc32, and fec are scattered throughout the tree. Move them to a central location so they can be built into a common "libmtd.a" library used by all mtd-utils programs. This patch only renames/deletes files and does not change the content. Also modify the build system and source code so that libmtd.a can be built from a "common" location (lib/). Statically link all utilities at the top level with libmtd.a . Minor changes to mkfs.ubifs to allow using the common crc32 implementation. Signed-off-by: Kevin Cernekee <cernekee@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2010-02-15build: add option to not force largefile supportPeter Korsgaard
Not all systems have largefile support (E.G. uClibc depending on config), so unconditionally enforcing largefile breaks the build. Work around it by adding a WITHOUT_LARGEFILE flag, similar to the existing WITHOUT_XATTR. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-02-27make sure compiler supports warning flagsMike Frysinger
Some compilers (like gcc-3.3) don't support all the newer -W flags that we are using. So import the compiler check found in the kernel and test each flag we add. The := is important so we only do the compiler tests once per `make` rather than every time we compile a file. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-02-11Artem Bityutskiy said once:linux-mtd-owner@lists.infradead.org
|I mean, IMO most of these warnings are not really sane, and cleaning |that up just adds mess - you stop understanding why is something signed |or unsigned :-) Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-02-11I have here a mtd part which is 3 GiB with a flash page size of 256KiB.linux-mtd-owner@lists.infradead.org
The 2GiB limit is at erase block 8192. In mtd_is_bad() the computation for the MEMGETBADBLOCK ioctl() looks like the following: | seek = eb * mtd->eb_size; with both eb and mtd->eb_size being a signed int results in seek being a signed result. The _FILE_OFFSET_BITS=64 define is required to switch off_t from 32bit to 64bit an 32bit systems. This is required in order to keep using lseek() as lseek64 on 32bit system. Without this change lseek() in mtd_read() is called with a 32bit value with most significat bit set and the kernel performs a sign extension for the 64bit value which is used in the mtd layer. The last change also changes the size of the parameter which is passed to the MEMGETBADBLOCK ioctl() from 32 to 64bit. The counter part in kernel is also defined as loff_t which is of type __kernel_loff_t and this is "long long". So this must have been broken for a while unless I missed something. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-01-13common.mk: tweak rules to workaround make-3.80 bugsMike Frysinger
I got some reports from people who use make-3.80 that mtd-utils wasn't building correctly the first time. Turns out that older versions of make misbehave with pattern rules and full paths. So I've tweaked the code a little to work with make-3.80 and make-3.81 (the latest release). Also, I added a small optimization to avoid running `mkdir` when building in-tree. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-12-22Unify all common build system partsMike Frysinger
Rather than duplicating the same thing over and over in every Makefile, move it all to common.mk. Other things fixed here: - doing subdirs in parallel - fix src!=build compiling in subdirs Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>