diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-06-25 13:20:37 -0400 |
---|---|---|
committer | Artem Bityutskiy <dedekind1@gmail.com> | 2011-06-27 09:07:07 +0300 |
commit | 3285a49dd871d54c1ec13076173ad617443baae1 (patch) | |
tree | 6b0962b6ec8437ffd54f03846f454943ea8bc443 /mkfs.ubifs | |
parent | 966122b0bbb175e9d8cc9876bb455e12c1d70eb9 (diff) |
rewrite build system to avoid recursion
The ubi-utils/src/ subdir is tossed as it just complicates things for no
real gain. The dictionary.h header is relocated to the ubi-utils/include/
since other headers in there need it.
The top level clean is replaced with a `find -delete` on objects, so it
might prune more than necessary, but many projects now do this sort of
thing and no one complained there.
A "mkdep" helper generates the actual rule, and the variables are used
with "foreach" to expand these automatically.
The tests subdir is updated only to reflect the ubi-utils source move.
Otherwise, it is left untouched as making that non-recursive isn't really
worth the effort.
While we're gutting things, also through in kbuild style output while
building to make things more legible.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <dedekind1@gmail.com>
Diffstat (limited to 'mkfs.ubifs')
-rw-r--r-- | mkfs.ubifs/Makefile | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/mkfs.ubifs/Makefile b/mkfs.ubifs/Makefile deleted file mode 100644 index ba21a8c..0000000 --- a/mkfs.ubifs/Makefile +++ /dev/null @@ -1,29 +0,0 @@ - -CPPFLAGS += -I../include -I../ubi-utils/include -CPPFLAGS += $(ZLIBCPPFLAGS) $(LZOCPPFLAGS) - -ALL_SOURCES=*.[ch] hashtable/*.[ch] - -TARGETS = mkfs.ubifs - -LDLIBS_mkfs.ubifs = -lz -llzo2 -lm -luuid -L$(BUILDDIR)/../ubi-utils/ -lubi -LDLIBS_mkfs.ubifs += -L$(BUILDDIR)/../lib -lmtd -LDLIBS_mkfs.ubifs += $(ZLIBLDFLAGS) $(LZOLDFLAGS) - -include ../common.mk - -$(BUILDDIR)/mkfs.ubifs: $(addprefix $(BUILDDIR)/,\ - crc16.o lpt.o compr.o devtable.o \ - hashtable/hashtable.o hashtable/hashtable_itr.o) - -clean:: - rm -f $(BUILDDIR)/hashtable/*.o cscope.* - -cscope: - @echo $(ALL_SOURCES) > cscope.files - @cscope -bR - @rm cscope.files - -install:: ${TARGETS} - mkdir -p ${DESTDIR}/${SBINDIR} - install -m 0755 ${TARGETS} ${DESTDIR}/${SBINDIR}/ |