From: Frank Haverkamp Date: Thu, 21 Feb 2008 14:00:13 +0000 (+0200) Subject: ubi-utils: Fixup Makefile for new version of the tools X-Git-Tag: v1.2.0~52 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=fb552c18cb72e2eb778e74f4bac2d61e059b4278;p=mtd-utils.git ubi-utils: Fixup Makefile for new version of the tools Because of defining targets which get never build calling make multiple times caused regeneration of the code. The fix creates proper .a files which prevent the rebuild since they exist after build. Signed-off-by: Frank Haverkamp --- diff --git a/ubi-utils/new-utils/Makefile b/ubi-utils/new-utils/Makefile index 2d073a9..175187e 100644 --- a/ubi-utils/new-utils/Makefile +++ b/ubi-utils/new-utils/Makefile @@ -29,26 +29,26 @@ all: $(UTILS) $(CC) $(CFLAGS) $< -c -o $@ # And the below is the rule to get final executable from its .o and common.o -%: libubi %.o common.o +%: libubi.a %.o common.o $(CC) $(CFLAGS) $(filter %.o, $^) -L. -lubi -o $@ ubicrc32: ubicrc32.o crc32.o $(CC) $(CFLAGS) -o $@ $^ -ubinize: ubinize.o common.o crc32.o libiniparser libubigen +ubinize: ubinize.o common.o crc32.o libiniparser.a libubigen.a $(CC) $(CFLAGS) $(filter %.o, $^) -L. -liniparser -lubigen -o $@ -libubi: libubi.o - $(AR) crv $@.a $^ - ranlib $@.a +libubi.a: libubi.o + $(AR) crv $@ $^ + ranlib $@ -libubigen: libubigen.o - $(AR) crv $@.a $^ - ranlib $@.a +libubigen.a: libubigen.o + $(AR) crv $@ $^ + ranlib $@ -libiniparser: libiniparser.o dictionary.o - $(AR) crv $@.a $^ - ranlib $@.a +libiniparser.a: libiniparser.o dictionary.o + $(AR) crv $@ $^ + ranlib $@ clean: rm -rf *.o $(addsuffix .a, $(LIBS)) $(UTILS) .*.c.dep