]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
automatically update makefile dependences
authorSebastian Pop <s.pop@samsung.com>
Sat, 26 Jan 2019 21:54:59 +0000 (15:54 -0600)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Tue, 26 Mar 2019 10:21:10 +0000 (11:21 +0100)
Makefile.in
arch/arm/Makefile.in
arch/x86/Makefile.in
configure

index 8f287476186bb2d78e4075056c696e5d0a878b98..1e8269522962dce6b06a2cbebeeb521347c0e420 100644 (file)
@@ -132,21 +132,21 @@ fuzzers:
 endif
 
 # The standalone fuzz target runner.
-standalone_fuzz_target_runner.o: $(SRCDIR)/test/fuzz/standalone_fuzz_target_runner.c
+standalone_fuzz_target_runner.o:
        $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
-checksum_fuzzer.o: $(SRCDIR)/test/fuzz/checksum_fuzzer.c
+checksum_fuzzer.o:
        $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
-compress_fuzzer.o: $(SRCDIR)/test/fuzz/compress_fuzzer.c
+compress_fuzzer.o:
        $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
-example_small_fuzzer.o: $(SRCDIR)/test/fuzz/example_small_fuzzer.c
+example_small_fuzzer.o:
        $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
-example_large_fuzzer.o: $(SRCDIR)/test/fuzz/example_large_fuzzer.c
+example_large_fuzzer.o:
        $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
-example_flush_fuzzer.o: $(SRCDIR)/test/fuzz/example_flush_fuzzer.c
+example_flush_fuzzer.o:
        $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
-example_dict_fuzzer.o: $(SRCDIR)/test/fuzz/example_dict_fuzzer.c
+example_dict_fuzzer.o:
        $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
-minigzip_fuzzer.o: $(SRCDIR)/test/fuzz/minigzip_fuzzer.c
+minigzip_fuzzer.o:
        $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
 checksum_fuzzer$(EXE): checksum_fuzzer.o standalone_fuzz_target_runner.o $(STATICLIB)
        $(CC) $(LDFLAGS) -o $@ $(LIB_FUZZING_ENGINE) checksum_fuzzer.o $(STATICLIB) -lpthread
@@ -181,16 +181,16 @@ $(STATICLIB): $(OBJS)
        $(AR) $(ARFLAGS) $@ $(OBJS)
        -@ ($(RANLIB) $@ || true) >/dev/null 2>&1
 
-example.o: $(SRCDIR)/test/example.c $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h
+example.o:
        $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/test/example.c
 
-minigzip.o: $(SRCDIR)/test/minigzip.c $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h
+minigzip.o:
        $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/test/minigzip.c
 
-example64.o: $(SRCDIR)/test/example.c $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h
+example64.o:
        $(CC) $(CFLAGS) -D_FILE_OFFSET_BITS=64 $(INCLUDES) -c -o $@ $(SRCDIR)/test/example.c
 
-minigzip64.o: $(SRCDIR)/test/minigzip.c $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h
+minigzip64.o:
        $(CC) $(CFLAGS) -D_FILE_OFFSET_BITS=64 $(INCLUDES) -c -o $@ $(SRCDIR)/test/minigzip.c
 
 zlibrc.o: win32/zlib$(SUFFIX)1.rc
@@ -360,59 +360,3 @@ distclean: clean
 
 tags:
        etags $(SRCDIR)/*.[ch]
-
-depend:
-       makedepend -Y -- $(CFLAGS) -- $(SRCDIR)/*.c $(SRCDIR)/$(ARCHDIR)/*.c
-       makedepend -Y -a -o.lo -- $(SFLAGS) -- $(SRCDIR)/*.c $(SRCDIR)/$(ARCHDIR)/*.c
-       @sed "s=^$(SRCDIR)/\($(ARCHDIR)/\)\?\([a-zA-Z0-9_]*\.\(lo\|o\):\)=\1\2=g" < Makefile > Makefile.tmp
-       @mv -f Makefile.tmp Makefile
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-adler32.o: $(SRCDIR)/functable.h $(SRCDIR)/zutil.h $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h
-functable.o: $(SRCDIR)/deflate.h $(SRCDIR)/deflate_p.h $(SRCDIR)/functable.h
-gzclose.o gzlib.o gzread.o gzwrite.o: $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h $(SRCDIR)/gzguts.h
-compress.o example.o minigzip.o uncompr.o: $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h
-crc32.o: $(SRCDIR)/zutil.h $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h $(SRCDIR)/crc32.h
-deflate.o: $(SRCDIR)/deflate.h $(SRCDIR)/deflate_p.h $(SRCDIR)/functable.h $(SRCDIR)/match_p.h $(SRCDIR)/zutil.h $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h
-deflate_fast.o: $(SRCDIR)/deflate.h $(SRCDIR)/deflate_p.h $(SRCDIR)/functable.h $(SRCDIR)/match_p.h $(SRCDIR)/zutil.h $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h
-deflate_medium.o: $(SRCDIR)/deflate.h $(SRCDIR)/deflate_p.h $(SRCDIR)/functable.h $(SRCDIR)/match_p.h $(SRCDIR)/zutil.h $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h
-deflate_slow.o: $(SRCDIR)/deflate.h $(SRCDIR)/deflate_p.h $(SRCDIR)/functable.h $(SRCDIR)/match_p.h $(SRCDIR)/zutil.h $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h
-infback.o: $(SRCDIR)/zutil.h $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h $(SRCDIR)/inftrees.h $(SRCDIR)/inflate.h $(SRCDIR)/inffast.h $(SRCDIR)/inffixed.h
-inffast.o: $(SRCDIR)/zutil.h $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h $(SRCDIR)/inftrees.h $(SRCDIR)/inflate.h $(SRCDIR)/inffast.h $(SRCDIR)/memcopy.h
-inflate.o: $(SRCDIR)/functable.h $(SRCDIR)/zutil.h $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h $(SRCDIR)/inftrees.h $(SRCDIR)/inflate.h $(SRCDIR)/inffast.h $(SRCDIR)/inffixed.h $(SRCDIR)/memcopy.h
-inftrees.o: $(SRCDIR)/zutil.h $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h $(SRCDIR)/inftrees.h
-trees.o: $(SRCDIR)/deflate.h $(SRCDIR)/zutil.h $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h $(SRCDIR)/trees.h
-zutil.o: $(SRCDIR)/zutil.h $(SRCDIR)/gzguts.h $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h
-arch/arm/adler32_neon.o: $(SRCDIR)/arch/arm/adler32_neon.h
-arch/arm/crc32_acle.o: zconf$(SUFFIX).h
-arch/arm/fill_window_arm.o: $(SRCDIR)/deflate.h $(SRCDIR)/deflate_p.h $(SRCDIR)/functable.h $(SRCDIR)/zutil.h $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h
-arch/arm/insert_string_acle.o: $(SRCDIR)/deflate.h $(SRCDIR)/zutil.h $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h
-arch/x86/crc_folding.o: $(SRCDIR)/arch/x86/crc_folding.h $(SRCDIR)/deflate.h $(SRCDIR)/zutil.h $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h
-arch/x86/deflate_quick.o: $(SRCDIR)/deflate.h $(SRCDIR)/zutil.h $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h
-arch/x86/fill_window_sse.o: $(SRCDIR)/deflate.h $(SRCDIR)/deflate_p.h $(SRCDIR)/functable.h $(SRCDIR)/zutil.h $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h
-arch/x86/x86.o: $(SRCDIR)/arch/x86/x86.h
-
-adler32.lo: $(SRCDIR)/functable.h $(SRCDIR)/zutil.h $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h
-functable.lo: $(SRCDIR)/deflate.h $(SRCDIR)/deflate_p.h $(SRCDIR)/functable.h
-gzclose.lo gzlib.lo gzread.lo gzwrite.lo: $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h $(SRCDIR)/gzguts.h
-compress.lo example.lo minigzip.lo uncompr.lo: $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h
-crc32.lo: $(SRCDIR)/zutil.h $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h $(SRCDIR)/crc32.h
-deflate.lo: $(SRCDIR)/deflate.h $(SRCDIR)/deflate_p.h $(SRCDIR)/functable.h $(SRCDIR)/match_p.h $(SRCDIR)/zutil.h $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h
-deflate_fast.lo: $(SRCDIR)/deflate.h $(SRCDIR)/deflate_p.h $(SRCDIR)/functable.h $(SRCDIR)/match_p.h $(SRCDIR)/zutil.h $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h
-deflate_medium.lo: $(SRCDIR)/deflate.h $(SRCDIR)/deflate_p.h $(SRCDIR)/functable.h $(SRCDIR)/match_p.h $(SRCDIR)/zutil.h $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h
-deflate_slow.lo: $(SRCDIR)/deflate.h $(SRCDIR)/deflate_p.h $(SRCDIR)/functable.h $(SRCDIR)/match_p.h $(SRCDIR)/zutil.h $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h
-infback.lo: $(SRCDIR)/zutil.h $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h $(SRCDIR)/inftrees.h $(SRCDIR)/inflate.h $(SRCDIR)/inffast.h $(SRCDIR)/inffixed.h
-inffast.lo: $(SRCDIR)/zutil.h $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h $(SRCDIR)/inftrees.h $(SRCDIR)/inflate.h $(SRCDIR)/inffast.h $(SRCDIR)/memcopy.h
-inflate.lo: $(SRCDIR)/functable.h $(SRCDIR)/zutil.h $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h $(SRCDIR)/inftrees.h $(SRCDIR)/inflate.h $(SRCDIR)/inffast.h $(SRCDIR)/inffixed.h $(SRCDIR)/memcopy.h
-inftrees.lo: $(SRCDIR)/zutil.h $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h $(SRCDIR)/inftrees.h
-trees.lo: $(SRCDIR)/deflate.h $(SRCDIR)/zutil.h $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h $(SRCDIR)/trees.h
-zutil.lo: $(SRCDIR)/zutil.h $(SRCDIR)/gzguts.h $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h
-arch/arm/adler32_neon.lo: $(SRCDIR)/arch/arm/adler32_neon.h
-arch/arm/crc32_acle.lo: zconf$(SUFFIX).h
-arch/arm/fill_window_arm.lo: $(SRCDIR)/deflate.h $(SRCDIR)/deflate_p.h $(SRCDIR)/functable.h $(SRCDIR)/zutil.h $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h
-arch/arm/insert_string_acle.lo: $(SRCDIR)/deflate.h $(SRCDIR)/zutil.h $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h
-arch/x86/crc_folding.lo: $(SRCDIR)/arch/x86/crc_folding.h $(SRCDIR)/deflate.h $(SRCDIR)/zutil.h $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h
-arch/x86/deflate_quick.lo: $(SRCDIR)/deflate.h $(SRCDIR)/zutil.h $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h
-arch/x86/fill_window_sse.lo: $(SRCDIR)/deflate.h $(SRCDIR)/deflate_p.h $(SRCDIR)/functable.h $(SRCDIR)/zutil.h $(SRCDIR)/zlib$(SUFFIX).h zconf$(SUFFIX).h
-arch/x86/x86.lo: $(SRCDIR)/arch/x86/x86.h
index 34d27107f65443bdf03969a11fbe6b514bbf8f1b..a64d591e53041fd4b27fdf1c4faa61805c698812 100644 (file)
@@ -14,34 +14,34 @@ TOPDIR=$(SRCTOP)
 
 all: adler32_neon.o adler32_neon.lo armfeature.o armfeature.lo crc32_acle.o crc32_acle.lo fill_window_arm.o fill_window_arm.lo insert_string_acle.o insert_string_acle.lo
 
-adler32_neon.o: $(SRCDIR)/adler32_neon.c
+adler32_neon.o:
        $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/adler32_neon.c
 
-adler32_neon.lo: $(SRCDIR)/adler32_neon.c
+adler32_neon.lo:
        $(CC) $(SFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/adler32_neon.c
 
-armfeature.o: $(SRCDIR)/armfeature.c
+armfeature.o:
        $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/armfeature.c
 
-armfeature.lo: $(SRCDIR)/armfeature.c
+armfeature.lo:
        $(CC) $(SFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/armfeature.c
 
-crc32_acle.o: $(SRCDIR)/crc32_acle.c
+crc32_acle.o:
        $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/crc32_acle.c
 
-crc32_acle.lo: $(SRCDIR)/crc32_acle.c
+crc32_acle.lo:
        $(CC) $(SFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/crc32_acle.c
 
-fill_window_arm.o: ${SRCDIR}/fill_window_arm.c
+fill_window_arm.o:
        $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/fill_window_arm.c
 
-fill_window_arm.lo: ${SRCDIR}/fill_window_arm.c
+fill_window_arm.lo:
        $(CC) $(SFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/fill_window_arm.c
 
-insert_string_acle.o: $(SRCDIR)/insert_string_acle.c
+insert_string_acle.o:
        $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/insert_string_acle.c
 
-insert_string_acle.lo: $(SRCDIR)/insert_string_acle.c
+insert_string_acle.lo:
        $(CC) $(SFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/insert_string_acle.c
 
 mostlyclean: clean
@@ -52,22 +52,3 @@ clean:
 
 distclean:
        rm -f Makefile
-
-depend:
-       makedepend -Y -- $(CFLAGS) -- $(SRCDIR)/*.c
-       makedepend -Y -a -o.lo -- $(SFLAGS) -- $(SRCDIR)/*.c
-       @sed "s=^$(SRCDIR)/\([a-zA-Z0-9_]*\.\(lo\|o\):\)=\1=g" < Makefile > Makefile.tmp
-       @mv -f Makefile.tmp Makefile
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-adler32_neon.o: $(SRCDIR)/adler32_neon.h
-crc32_acle.o: $(TOPDIR)/zconf$(SUFFIX).h
-fill_window_arm.o: $(SRCTOP)/deflate.h $(SRCTOP)/deflate_p.h $(SRCTOP)/functable.h $(SRCTOP)/zutil.h $(SRCTOP)/zlib$(SUFFIX).h $(TOPDIR)/zconf$(SUFFIX).h
-insert_string_acle.o: $(SRCTOP)/deflate.h $(SRCTOP)/zutil.h $(SRCTOP)/zlib$(SUFFIX).h $(TOPDIR)/zconf$(SUFFIX).h
-
-adler32_neon.lo: $(SRCDIR)/adler32_neon.h
-crc32_acle.lo: $(TOPDIR)/zconf$(SUFFIX).h
-fill_window_arm.lo: $(SRCTOP)/deflate.h $(SRCTOP)/deflate_p.h $(SRCTOP)/functable.h $(SRCTOP)/zutil.h $(SRCTOP)/zlib$(SUFFIX).h $(TOPDIR)/zconf$(SUFFIX).h
-insert_string_acle.lo: $(SRCTOP)/deflate.h $(SRCTOP)/zutil.h $(SRCTOP)/zlib$(SUFFIX).h $(TOPDIR)/zconf$(SUFFIX).h
-
index b041b087f4967883f31da706eb623e8b8b9f04b5..2e473c6268aa29e5304fee81e89832a056887843 100644 (file)
@@ -18,34 +18,34 @@ TOPDIR=$(SRCTOP)
 
 all: x86.o x86.lo fill_window_sse.o fill_window_sse.lo deflate_quick.o deflate_quick.lo insert_string_sse.o insert_string_sse.lo crc_folding.o crc_folding.lo
 
-x86.o: $(SRCDIR)/x86.c
+x86.o:
        $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/x86.c
 
-x86.lo: $(SRCDIR)/x86.c
+x86.lo:
        $(CC) $(SFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/x86.c
 
-fill_window_sse.o: $(SRCDIR)/fill_window_sse.c
+fill_window_sse.o:
        $(CC) $(CFLAGS) $(SSE2FLAG) $(INCLUDES) -c -o $@ $(SRCDIR)/fill_window_sse.c
 
-fill_window_sse.lo: $(SRCDIR)/fill_window_sse.c
+fill_window_sse.lo:
        $(CC) $(SFLAGS) $(SSE2FLAG) -DPIC $(INCLUDES) -c -o $@ $(SRCDIR)/fill_window_sse.c
 
-deflate_quick.o: $(SRCDIR)/deflate_quick.c
+deflate_quick.o:
        $(CC) $(CFLAGS) $(SSE4FLAG) $(INCLUDES) -c -o $@ $(SRCDIR)/deflate_quick.c
 
-deflate_quick.lo: $(SRCDIR)/deflate_quick.c
+deflate_quick.lo:
        $(CC) $(SFLAGS) $(SSE4FLAG) -DPIC $(INCLUDES) -c -o $@ $(SRCDIR)/deflate_quick.c
 
-insert_string_sse.o: $(SRCDIR)/insert_string_sse.c
+insert_string_sse.o:
        $(CC) $(CFLAGS) $(SSE4FLAG) $(INCLUDES) -c -o $@ $(SRCDIR)/insert_string_sse.c
 
-insert_string_sse.lo: $(SRCDIR)/insert_string_sse.c
+insert_string_sse.lo:
        $(CC) $(SFLAGS) $(SSE4FLAG) -DPIC $(INCLUDES) -c -o $@ $(SRCDIR)/insert_string_sse.c
 
-crc_folding.o: $(SRCDIR)/crc_folding.c
+crc_folding.o:
        $(CC) $(CFLAGS) $(PCLMULFLAG) $(SSE4FLAG) $(INCLUDES) -c -o $@ $(SRCDIR)/crc_folding.c
 
-crc_folding.lo: $(SRCDIR)/crc_folding.c
+crc_folding.lo:
        $(CC) $(SFLAGS) $(PCLMULFLAG) $(SSE4FLAG) -DPIC $(INCLUDES) -c -o $@ $(SRCDIR)/crc_folding.c
 
 mostlyclean: clean
@@ -56,21 +56,3 @@ clean:
 
 distclean:
        rm -f Makefile
-
-depend:
-       makedepend -Y -- $(CFLAGS) -- $(SRCDIR)/*.c
-       makedepend -Y -a -o.lo -- $(SFLAGS) -- $(SRCDIR)/*.c
-       @sed "s=^$(SRCDIR)/\([a-zA-Z0-9_]*\.\(lo\|o\):\)=\1=g" < Makefile > Makefile.tmp
-       @mv -f Makefile.tmp Makefile
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-crc_folding.o: $(SRCDIR)/crc_folding.h $(SRCTOP)/deflate.h $(SRCTOP)/zutil.h $(SRCTOP)/zlib$(SUFFIX).h $(TOPDIR)/zconf$(SUFFIX).h
-deflate_quick.o: $(SRCTOP)/deflate.h $(SRCTOP)/zutil.h $(SRCTOP)/zlib$(SUFFIX).h $(TOPDIR)/zconf$(SUFFIX).h
-fill_window_sse.o: $(SRCTOP)/deflate.h $(SRCTOP)/deflate_p.h $(SRCTOP)/functable.h $(SRCTOP)/zutil.h $(SRCTOP)/zlib$(SUFFIX).h $(TOPDIR)/zconf$(SUFFIX).h
-x86.o: $(SRCDIR)/x86.h
-
-crc_folding.lo: $(SRCDIR)/crc_folding.h $(SRCTOP)/deflate.h $(SRCTOP)/zutil.h $(SRCTOP)/zlib$(SUFFIX).h $(TOPDIR)/zconf$(SUFFIX).h
-deflate_quick.lo: $(SRCTOP)/deflate.h $(SRCTOP)/zutil.h $(SRCTOP)/zlib$(SUFFIX).h $(TOPDIR)/zconf$(SUFFIX).h
-fill_window_sse.lo: $(SRCTOP)/deflate.h $(SRCTOP)/deflate_p.h $(SRCTOP)/functable.h $(SRCTOP)/zutil.h $(SRCTOP)/zlib$(SUFFIX).h $(TOPDIR)/zconf$(SUFFIX).h
-x86.lo: $(SRCDIR)/x86.h
index e09b2e62a2d45b47d0e40b0cf6f4f63ed6fb7459..91ae5be558e491f48dc86a3a779babe3a0e76653 100755 (executable)
--- a/configure
+++ b/configure
@@ -1303,6 +1303,58 @@ sed < $SRCDIR/Makefile.in "
 /^ARCH_SHARED_OBJS *=/s#=.*#=$ARCH_SHARED_OBJS#
 " > Makefile
 
+# Append header files dependences.
+for file in $(ls -1 $SRCDIR/*.c $SRCDIR/test/*.c $SRCDIR/test/fuzz/*.c $SRCDIR/$ARCHDIR/*.c); do
+    short_name=$(echo $file | sed -e "s#$SRCDIR/##g")
+    incs=$(grep -h include $file | sed -n 's/# *\include *"\(.*\.h\)".*/\1/p' | sort | uniq)
+    includes=$(for i in $incs; do
+                   # Check that the include file exists in the current dir,
+                   # otherwise it may be one of the system include header.
+                   if test -e $SRCDIR/$i; then
+                       echo -n " \$(SRCDIR)/$i"
+                   fi
+                   # We also need to check whether the include file is in the ARCHDIR.
+                   if test -e $SRCDIR/$ARCHDIR/$i; then
+                       echo -n " \$(SRCDIR)/$ARCHDIR/$i"
+                   fi
+               done)
+    obj=$(basename $(echo $file | sed -e 's/\.c/\.o/g' -e 's#^\./##g'))
+    lobj=$(basename $(echo $file | sed -e 's/\.c/\.lo/g' -e 's#^\./##g'))
+
+    if grep -q "^$obj:" Makefile; then
+        # Replace the existing line with a line with all dependences.
+        sed -i "s#$obj:.*#$obj: \$(SRCDIR)/$short_name $includes#g" Makefile
+
+        # Special case example64 and minigzip64.
+        case "$obj" in
+            example.o)
+                sed -i "s#example64.o:.*#example64.o: \$(SRCDIR)/$short_name $includes#g" Makefile
+                ;;
+            minigzip.o)
+                sed -i "s#minigzip64.o:.*#minigzip64.o: \$(SRCDIR)/$short_name $includes#g" Makefile
+                ;;
+        esac
+    else
+        # Append at the end of Makefile a new line with the header dependences.
+        echo "$obj: \$(SRCDIR)/$short_name $includes" >> Makefile
+
+        # In case this is one of the ARCHDIR files, append a dependence line
+        # that will force the `$(MAKE) -C $(ARCHDIR)` generic rule. Without this
+        # we would only execute the copy rule from ARCHDIR to SRCDIR.
+        if test -e $SRCDIR/$ARCHDIR/$(basename $file); then
+            echo "$ARCHDIR/$obj: \$(SRCDIR)/$short_name $includes" >> Makefile
+        fi
+    fi
+
+    if grep -q "^$lobj:" Makefile; then
+        # Replace the existing line with a line with all dependences.
+        sed -i "s#$lobj:.*#$lobj: \$(SRCDIR)/$short_name $includes#g" Makefile
+    else
+        # Append at the end of Makefile a new line with the header dependences.
+        echo "$lobj: \$(SRCDIR)/$short_name $includes" >> Makefile
+    fi
+done
+
 # Generate Makefile in arch dir
 mkdir -p $ARCHDIR
 
@@ -1324,6 +1376,40 @@ sed < $SRCDIR/$ARCHDIR/Makefile.in "
 /^PCLMULFLAG *=/s#=.*#=$pclmulflag#
 " > $ARCHDIR/Makefile
 
+# Append header files dependences.
+for file in $(ls -1 $SRCDIR/$ARCHDIR/*.c); do
+    incs=$(grep -h include $file | sed -n 's/# *\include *"\(.*\.h\)".*/\1/p' | sort | uniq)
+    includes=$(for i in $incs; do
+                   # Check that the include file exists in the current dir,
+                   # otherwise it may be one of the system include header.
+                   if test -e $SRCDIR/$i; then
+                       echo -n " \$(SRCTOP)/$i"
+                   fi
+                   # We also need to check whether the include file is in the ARCHDIR.
+                   if test -e $SRCDIR/$ARCHDIR/$i; then
+                       echo -n " \$(SRCDIR)/$i"
+                   fi
+               done)
+    obj=$(basename $(echo $file | sed -e 's/\.c/\.o/g' -e 's#^\./##g'))
+    lobj=$(basename $(echo $file | sed -e 's/\.c/\.lo/g' -e 's#^\./##g'))
+    short_name=$(basename $file)
+    if grep -q "^$obj:" $ARCHDIR/Makefile; then
+        # Replace the existing line with a line with all dependences.
+        sed -i "s#$obj:.*#$obj: \$(SRCDIR)/$short_name $includes#g" $ARCHDIR/Makefile
+    else
+        # Append at the end of Makefile a new line with the header dependences.
+        echo "$obj: \$(SRCDIR)/$short_name $includes" >> $ARCHDIR/Makefile
+    fi
+
+    if grep -q "^$lobj:" $ARCHDIR/Makefile; then
+        # Replace the existing line with a line with all dependences.
+        sed -i "s#$lobj:.*#$lobj: \$(SRCDIR)/$short_name $includes#g" $ARCHDIR/Makefile
+    else
+        # Append at the end of Makefile a new line with the header dependences.
+        echo "$lobj: \$(SRCDIR)/$short_name $includes" >> $ARCHDIR/Makefile
+    fi
+done
+
 # Generate Makefile in test dir
 mkdir -p test
 if test $compat -eq 1; then COMPATTESTS="compattests"; fi