libstand: Adjust zlib hadling.
authorzrj <rimvydas.jasinskas@gmail.com>
Mon, 8 Apr 2019 10:22:53 +0000 (13:22 +0300)
committerzrj <zrj@dragonflybsd.org>
Mon, 8 Apr 2019 19:32:54 +0000 (22:32 +0300)
Avoid crc32.c search issue in .PATH, move Makefile.stand inclusion
before sys/libkern. Add comments why.

lib/libstand/Makefile
lib/libz/Makefile.stand

index 7097afb..eb09d6f 100644 (file)
@@ -67,8 +67,6 @@ SRCS+=        bcmp.c bcopy.c bzero.c ffs.c index.c memccpy.c memchr.c memcmp.c \
 qdivrem.o:     qdivrem.c
        ${CC} ${CFLAGS:N-flto} -c -o ${.TARGET} ${.IMPSRC}
 .endif
-.PATH: ${LIBSTAND_SRC}/../../sys/libkern
-SRCS+=  icrc32.c
 
 # _setjmp/_longjmp
 .PATH: ${LIBSTAND_SRC}/${LIBSTAND_ARCH}
@@ -78,6 +76,14 @@ CFLAGS+=-I${LIBSTAND_SRC}/../libc/${MACHINE_ARCH}
 .endif
 SRCS+= _setjmp.S
 
+# decompression functionality from libz
+# NOTE: crc32.c is used from libz and not libkern
+.include "../libz/Makefile.stand"
+
+# iscsi_crc32() for hammer2
+.PATH: ${LIBSTAND_SRC}/../../sys/libkern
+SRCS+=  icrc32.c
+
 # decompression functionality from libbz2
 BZ2DIR=        ${LIBSTAND_SRC}/../../contrib/bzip2
 .PATH: ${BZ2DIR}
@@ -93,8 +99,6 @@ ${file}: ${BZ2DIR}/${file} ${file}.diff
        patch -o ${.TARGET} < ${.ALLSRC:M*.diff} ${.ALLSRC:M*.[ch]}
 .endfor
 
-.include "../libz/Makefile.stand"
-
 # io routines
 SRCS+= closeall.c dev.c ioctl.c nullfs.c stat.c \
        fstat.c close.c lseek.c open.c read.c write.c readdir.c
index 40479ba..d7437c9 100644 (file)
@@ -1,5 +1,3 @@
-# $DragonFly: src/lib/libz/Makefile.stand,v 1.4 2005/07/21 16:07:41 joerg Exp $
-
 # decompression functionality from libz for libstand
 
 # relative to lib/libstand