]> www.infradead.org Git - mtd-utils.git/commitdiff
ubi-utils: Fixup Makefile for new version of the tools
authorFrank Haverkamp <haver@vnet.ibm.com>
Thu, 21 Feb 2008 14:00:13 +0000 (16:00 +0200)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Thu, 21 Feb 2008 14:00:13 +0000 (16:00 +0200)
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 <haver@vnet.ibm.com>
ubi-utils/new-utils/Makefile

index 2d073a91c63002a99101d059023d7b2e81b7223c..175187edae6c70ebd53c2e4d5a15151d87a8a952 100644 (file)
@@ -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