<commit_before># $Id$

MKDEP=		env CC="${CC}" ${ROOTDIR}/tools/unwrapcc ${ROOTDIR}/tools/mkdep

# Disappointingly, recent versions of gcc hide
# standard headers in places other than /usr/include.
LIBC_INCLUDES+=	$$(if ${CC} -v 2>&1 | grep -q gcc; then ${CC} -print-search-dirs | \
		    grep install | awk '{print "-I" $$2 "include"}' | sed 's/:/ -I/'; fi)
LINT=		splint +posixlib
NOTEMPTY=	${ROOTDIR}/tools/notempty
SCONS=		scons
PKG_CONFIG_PROG=pkg-config
PKG_CONFIG=	PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ${PKG_CONFIG_PROG}
GENTYPES=	${ROOTDIR}/tools/gentypes.pl
HDRCLEAN=	${ROOTDIR}/tools/hdrclean.pl
LIBDEP=		${ROOTDIR}/tools/libdep.pl
ECHORUN=	${ROOTDIR}/tools/echorun.sh
MAKEFLAGS+=	--no-print-directory

# XXX this needs bumped
LKERNEL_BASE=	${ROOTDIR}/kernel/2.6.9-42.0.8.EL_lustre.1.4.9.1

LFLAGS+=	-t
YFLAGS+=	-d

CFLAGS+=	-Wall -W
CFLAGS+=	-g
#CFLAGS+=	-ggdb3
#CFLAGS+=	-Wunused -Wuninitialized -O
#CFLAGS+=	-Wshadow
DEFINES+=	-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
DEFINES+=	-D_REENTRANT -D_GNU_SOURCE -DYY_NO_UNPUT
DEFINES+=	-DHAVE_GETHOSTBYNAME

LIBL?=		-ll

KERNEL_BASE=	/usr/src/kernels/linux

ifneq ($(filter fuse,${MODULES}),)
CFLAGS+=	$$(PKG_CONFIG_PATH=${FUSE_BASE} ${PKG_CONFIG_PROG} --cflags fuse | ${EXTRACT_CFLAGS})
DEFINES+=	$$(PKG_CONFIG_PATH=${FUSE_BASE} ${PKG_CONFIG_PROG} --cflags fuse | ${EXTRACT_DEFINES})
INCLUDES+=	$$(PKG_CONFIG_PATH=${FUSE_BASE} ${PKG_CONFIG_PROG} --cflags fuse | ${EXTRACT_INCLUDES})
LDFLAGS+=	$$(PKG_CONFIG_PATH=${FUSE_BASE} ${PKG_CONFIG_PROG} --libs fuse)
endif

ifneq ($(filter zfs,${MODULES}),)
INCLUDES+=	-I${ZFS_BASE}

LDFLAGS+=	-L${ZFS_BASE}/zfs-fuse				\
		-L${ZFS_BASE}/lib/libavl			\
		-L${ZFS_BASE}/lib/libnvpair			\
		-L${ZFS_BASE}/lib/libsolkerncompat		\
		-L${ZFS_BASE}/lib/libumem			\
		-L${ZFS_BASE}/lib/libzfscommon			\
		-L${ZFS_BASE}/lib/libzpool			\
		-lzfs-fuse -lzpool-kernel -lzfscommon-kernel	\
		-lnvpair-kernel -lavl -lumem -lsolkerncompat
endif

ifneq ($(filter lnet,${MODULES}),)
SRCS+=		${LNET_CFS_SRCS}
SRCS+=		${LNET_LIB_SRCS}

INCLUDES+=	-I${LNET_BASE}/include
endif

ifneq ($(filter lnet-hdrs,${MODULES}),)
INCLUDES+=	-I${LNET_BASE}/include
endif

ifneq ($(filter pthread,${MODULES}),)
LDFLAGS+=	-pthread -lrt
DEFINES+=	-DHAVE_LIBPTHREAD
endif

ifneq ($(wildcard /opt/sgi),)
  # on altix
  DEFINES+=	-DCONFIG_NR_CPUS=2 -DHAVE_NUMA
  NUMA_LIBS=	-lcpuset -lbitmask -lnuma
endif

ifneq ($(wildcard /opt/xt-pe),)
  # on xt3
  SRCS+=	${PFL_BASE}/compat/posix_memalign.c
  DEFINES+=	-DHOST_NAME_MAX=MAXHOSTNAMELEN
endif
<commit_msg>add -lz and -ldl to ZFS module<commit_after># $Id$

MKDEP=		env CC="${CC}" ${ROOTDIR}/tools/unwrapcc ${ROOTDIR}/tools/mkdep

# Disappointingly, recent versions of gcc hide
# standard headers in places other than /usr/include.
LIBC_INCLUDES+=	$$(if ${CC} -v 2>&1 | grep -q gcc; then ${CC} -print-search-dirs | \
		    grep install | awk '{print "-I" $$2 "include"}' | sed 's/:/ -I/'; fi)
LINT=		splint +posixlib
NOTEMPTY=	${ROOTDIR}/tools/notempty
SCONS=		scons
PKG_CONFIG_PROG=pkg-config
PKG_CONFIG=	PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ${PKG_CONFIG_PROG}
GENTYPES=	${ROOTDIR}/tools/gentypes.pl
HDRCLEAN=	${ROOTDIR}/tools/hdrclean.pl
LIBDEP=		${ROOTDIR}/tools/libdep.pl
ECHORUN=	${ROOTDIR}/tools/echorun.sh
MAKEFLAGS+=	--no-print-directory

# XXX this needs bumped
LKERNEL_BASE=	${ROOTDIR}/kernel/2.6.9-42.0.8.EL_lustre.1.4.9.1

LFLAGS+=	-t
YFLAGS+=	-d

CFLAGS+=	-Wall -W
CFLAGS+=	-g
#CFLAGS+=	-ggdb3
#CFLAGS+=	-Wunused -Wuninitialized -O
#CFLAGS+=	-Wshadow
DEFINES+=	-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
DEFINES+=	-D_REENTRANT -D_GNU_SOURCE -DYY_NO_UNPUT
DEFINES+=	-DHAVE_GETHOSTBYNAME

LIBL?=		-ll

KERNEL_BASE=	/usr/src/kernels/linux

ifneq ($(filter fuse,${MODULES}),)
CFLAGS+=	$$(PKG_CONFIG_PATH=${FUSE_BASE} ${PKG_CONFIG_PROG} --cflags fuse | ${EXTRACT_CFLAGS})
DEFINES+=	$$(PKG_CONFIG_PATH=${FUSE_BASE} ${PKG_CONFIG_PROG} --cflags fuse | ${EXTRACT_DEFINES})
INCLUDES+=	$$(PKG_CONFIG_PATH=${FUSE_BASE} ${PKG_CONFIG_PROG} --cflags fuse | ${EXTRACT_INCLUDES})
LDFLAGS+=	$$(PKG_CONFIG_PATH=${FUSE_BASE} ${PKG_CONFIG_PROG} --libs fuse)
endif

ifneq ($(filter zfs,${MODULES}),)
INCLUDES+=	-I${ZFS_BASE}

LDFLAGS+=	-L${ZFS_BASE}/zfs-fuse				\
		-L${ZFS_BASE}/lib/libavl			\
		-L${ZFS_BASE}/lib/libnvpair			\
		-L${ZFS_BASE}/lib/libsolkerncompat		\
		-L${ZFS_BASE}/lib/libumem			\
		-L${ZFS_BASE}/lib/libzfscommon			\
		-L${ZFS_BASE}/lib/libzpool			\
		-lzfs-fuse -lzpool-kernel -lzfscommon-kernel	\
		-lnvpair-kernel -lavl -lumem -lsolkerncompat
MODULES+=	z dl
endif

ifneq ($(filter lnet,${MODULES}),)
SRCS+=		${LNET_CFS_SRCS}
SRCS+=		${LNET_LIB_SRCS}

INCLUDES+=	-I${LNET_BASE}/include
endif

ifneq ($(filter lnet-hdrs,${MODULES}),)
INCLUDES+=	-I${LNET_BASE}/include
endif

ifneq ($(filter pthread,${MODULES}),)
LDFLAGS+=	-pthread
DEFINES+=	-DHAVE_LIBPTHREAD
MODULES+=	rt
endif

ifneq ($(filter rt,${MODULES}),)
LDFLAGS+=	-lrt
endif

ifneq ($(filter dl,${MODULES}),)
LDFLAGS+=	-ldl
endif

ifneq ($(filter z,${MODULES}),)
LDFLAGS+=	-lz
endif

ifneq ($(wildcard /opt/sgi),)
  # on altix
  DEFINES+=	-DCONFIG_NR_CPUS=2 -DHAVE_NUMA
  NUMA_LIBS=	-lcpuset -lbitmask -lnuma
endif

ifneq ($(wildcard /opt/xt-pe),)
  # on xt3
  SRCS+=	${PFL_BASE}/compat/posix_memalign.c
  DEFINES+=	-DHOST_NAME_MAX=MAXHOSTNAMELEN
endif

{'fraction_non_alphanumeric': 0.18082088140722527, 'fraction_numerical': 0.00794401361830906, 'mean_word_length': 4.849557522123894, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6361786', 'n_tokens_mistral': 2508, 'n_tokens_neox': 2405, 'n_words': 420}