<commit_before>
# Use ?= for standardized variables to allow override from the env or
# command-line.
CC?=		gcc
CXX?= 		g++
CXXFLAGS?=	-g -Wall -O2 -fPIC #-m64 #-arch ppc

DFLAGS=		-D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE
PROG=		tabix++
INCLUDES=	-Ihtslib
SUBDIRS=.
LIBPATH=	-L. -Lhtslib

.SUFFIXES:.c .o

.c.o:
		$(CC) -c $(CXXFLAGS) $(DFLAGS) $(INCLUDES) $< -o $@

all-recur lib-recur clean-recur cleanlocal-recur install-recur:
	@target=`echo $@ | sed s/-recur//`; \
	wdir=`pwd`; \
	list='$(SUBDIRS)'; for subdir in $$list; do \
		cd $$subdir; \
		$(MAKE) CC="$(CC)" DFLAGS="$(DFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
			INCLUDES="$(INCLUDES)" LIBPATH="$(LIBPATH)" $$target \
			|| exit 1; \
		cd $$wdir; \
	done;

all:	$(PROG)

tabix.o:	htslib/htslib/bgzf.h htslib/htslib/tbx.h tabix.cpp tabix.hpp
		$(CXX) $(CXXFLAGS) -c tabix.cpp $(INCLUDES)

htslib/libhts.a:
	cd htslib && $(MAKE) lib-static

tabix++:	tabix.o main.cpp htslib/libhts.a
	$(CXX) $(CXXFLAGS) -o $@ main.cpp tabix.o $(INCLUDES) $(LIBPATH) \
		-lhts -lpthread -lm -lz
<commit_msg>Allow omitting HTS headers from rule.<commit_after>
# Use ?= to allow override from the env or command-line.

CC?=		gcc
CXX?= 		g++
CXXFLAGS?=	-g -Wall -O2 -fPIC #-m64 #-arch ppc

DFLAGS=		-D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE
PROG=		tabix++
INCLUDES=	-Ihtslib
HTS_HEADERS?=	htslib/htslib/bgzf.h htslib/htslib/tbx.h
SUBDIRS=.
LIBPATH=	-L. -Lhtslib

.SUFFIXES:.c .o

.c.o:
	$(CC) -c $(CXXFLAGS) $(DFLAGS) $(INCLUDES) $< -o $@

all-recur lib-recur clean-recur cleanlocal-recur install-recur:
	@target=`echo $@ | sed s/-recur//`; \
	wdir=`pwd`; \
	list='$(SUBDIRS)'; for subdir in $$list; do \
		cd $$subdir; \
		$(MAKE) CC="$(CC)" DFLAGS="$(DFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
			INCLUDES="$(INCLUDES)" LIBPATH="$(LIBPATH)" $$target \
			|| exit 1; \
		cd $$wdir; \
	done;

all:	$(PROG)

tabix.o: $(HTS_HEADERS) tabix.cpp tabix.hpp
	$(CXX) $(CXXFLAGS) -c tabix.cpp $(INCLUDES)

htslib/libhts.a:
	cd htslib && $(MAKE) lib-static

tabix++: tabix.o main.cpp htslib/libhts.a
	$(CXX) $(CXXFLAGS) -o $@ main.cpp tabix.o $(INCLUDES) $(LIBPATH) \
		-lhts -lpthread -lm -lz

{'fraction_non_alphanumeric': 0.205140409328891, 'fraction_numerical': 0.005711565920990005, 'mean_word_length': 3.589519650655022, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '577632', 'n_tokens_mistral': 1067, 'n_tokens_neox': 969, 'n_words': 216}