diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2009-03-17 10:14:54 +0200 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2009-03-17 10:16:38 +0200 |
commit | 606f38a2221648ca5c5fa292c9f71d2ddd59fa66 (patch) | |
tree | 26d11905fda474261433c580c6fb58f4f4a85e59 /ubi-utils/Makefile | |
parent | a2d010f8fca904fffa3c6e5a5d148cc96a37a08a (diff) |
ubi-utils: re-arrange directory layout
Move new-utils to ubi-utils and old ones to ubi-utils/old-utils.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'ubi-utils/Makefile')
-rw-r--r-- | ubi-utils/Makefile | 64 |
1 files changed, 31 insertions, 33 deletions
diff --git a/ubi-utils/Makefile b/ubi-utils/Makefile index 3be813a..020fe09 100644 --- a/ubi-utils/Makefile +++ b/ubi-utils/Makefile @@ -4,58 +4,56 @@ KERNELHDR := ../include -CFLAGS ?= -O2 -g -Werror -CPPFLAGS += -I./inc -I./src -I$(KERNELHDR) \ - -std=gnu99 -DPACKAGE_VERSION=\"1.0\" +SUBDIRS = old-utils -PERLPROGS = mkpfi ubicrc32.pl +#CFLAGS += -Werror +CPPFLAGS += -Iinclude -Isrc -I$(KERNELHDR) -SUBDIRS = new-utils +LIBS = libubi libmtd libubigen libiniparser libscan +TARGETS = ubiupdatevol ubimkvol ubirmvol ubicrc32 ubinfo ubiattach \ + ubidetach ubinize ubiformat ubirename -TARGETS = pfiflash pddcustomize ubimirror bin2nand nand2bin ubigen \ - mkbootenv unubi pfi2bin - -vpath %.c ./src +vpath %.c src include ../common.mk -$(BUILDDIR)/pddcustomize: $(addprefix $(BUILDDIR)/,\ - pddcustomize.o error.o libubimirror.o bootenv.o hashmap.o \ - libubi.o crc32.o) +# And the below is the rule to get final executable from its .o and common.o +$(TARGETS): $(addprefix $(BUILDDIR)/,\ + libubi.a common.o) +# $(CC) $(CFLAGS) $(filter %.o, $^) -L. -lubi -o $@ + +$(BUILDDIR)/ubicrc32: $(addprefix $(BUILDDIR)/,\ + ubicrc32.o crc32.o) +# $(CC) $(CFLAGS) -o $@ $^ -$(BUILDDIR)/pfiflash: $(addprefix $(BUILDDIR)/,\ - pfiflash.o libpfiflash.o list.o reader.o error.o libubimirror.o \ - bootenv.o hashmap.o pfi.o libubi.o crc32.o) +$(BUILDDIR)/ubinize: $(addprefix $(BUILDDIR)/,\ + ubinize.o common.o crc32.o libiniparser.a libubigen.a) +# $(CC) $(CFLAGS) $(filter %.o, $^) -L. -liniparser -lubigen -o $@ -$(BUILDDIR)/ubimirror: $(addprefix $(BUILDDIR)/,\ - ubimirror.o error.o libubimirror.o bootenv.o hashmap.o \ - libubi.o crc32.o) +$(BUILDDIR)/ubiformat: $(addprefix $(BUILDDIR)/,\ + ubiformat.o common.o crc32.o libmtd.a libscan.a libubi.a libubigen.a) +# $(CC) $(CFLAGS) $(filter %.o, $^) -L. -lmtd -lscan -lubi -lubigen -o $@ -$(BUILDDIR)/nand2bin: $(addprefix $(BUILDDIR)/,\ - nand2bin.o nandecc.o nandcorr.o) +$(BUILDDIR)/libubi.a: $(BUILDDIR)/libubi.o -$(BUILDDIR)/bin2nand: $(addprefix $(BUILDDIR)/,\ - bin2nand.o error.o nandecc.o) +$(BUILDDIR)/libmtd.a: $(BUILDDIR)/libmtd.o -$(BUILDDIR)/ubigen: $(addprefix $(BUILDDIR)/,\ - ubigen.o libubigen.o crc32.o) +$(BUILDDIR)/libubigen.a: $(BUILDDIR)/libubigen.o -$(BUILDDIR)/mkbootenv: $(addprefix $(BUILDDIR)/,\ - mkbootenv.o bootenv.o hashmap.o error.o crc32.o) +$(BUILDDIR)/libiniparser.a: $(addprefix $(BUILDDIR)/,\ + libiniparser.o dictionary.o) -$(BUILDDIR)/unubi: $(addprefix $(BUILDDIR)/,\ - unubi.o crc32.o unubi_analyze.o eb_chain.o) +$(BUILDDIR)/libscan.a: $(addprefix $(BUILDDIR)/,\ + libscan.o crc32.o) -$(BUILDDIR)/pfi2bin: $(addprefix $(BUILDDIR)/,\ - pfi2bin.o peb.o error.o list.o crc32.o libubigen.o bootenv.o \ - hashmap.o reader.o pfi.o) +clean:: + rm -f $(addsuffix .a, $(LIBS)) install:: mkdir -p ${DESTDIR}/${SBINDIR} install -m 0755 ${TARGETS} ${DESTDIR}/${SBINDIR}/ - (cd perl && install ${PERLPROGS} ${DESTDIR}/${SBINDIR}/) uninstall: - for file in ${TARGETS} ${PERLPROGS}; do \ + for file in ${TARGETS}; do \ $(RM) ${DESTDIR}/${SBINDIR}/$$file; \ done |