<commit_before>PROGNAME      = precomp
CFLAGS        = -DLINUX -D_FILE_OFFSET_BITS=64 -O2 -Wall
SRC_PACKJPG   = contrib/packjpg/aricoder.cpp contrib/packjpg/bitops.cpp contrib/packjpg/packjpg.cpp
FLAGS_PACKJPG = -O3 -DUNIX -DBUILD_LIB -Wall -pedantic -funroll-loops -ffast-math -fsched-spec-load -fomit-frame-pointer
OBJ_ZLIB      = contrib/zlib/adler32.o contrib/zlib/crc32.o contrib/zlib/zutil.o contrib/zlib/trees.o contrib/zlib/inftrees.o contrib/zlib/inffast.o contrib/zlib/inflate.o contrib/zlib/deflate.o
OBJ_BZIP2     = contrib/bzip2/bzlib.o contrib/bzip2/blocksort.o contrib/bzip2/crctable.o contrib/bzip2/compress.o contrib/bzip2/decompress.o contrib/bzip2/huffman.o contrib/bzip2/randtable.o
OBJ_GIFLIB    = contrib/giflib/gifalloc.o contrib/giflib/gif_err.o contrib/giflib/dgif_lib_gcc.o contrib/giflib/egif_lib_gcc.o
OBJECTS       = aricoder.o bitops.o packjpg.o adler32.o crc32.o zutil.o trees.o inftrees.o inffast.o inflate.o deflate.o bzlib.o blocksort.o crctable.o compress.o decompress.o huffman.o randtable.o gifalloc.o gif_err.o dgif_lib_gcc.o egif_lib_gcc.o

.PHONY: all
all: packjpg $(PROGNAME)

.PHONY: clean
clean:
	rm -f *.o
	rm -f $(PROGNAME)

$(PROGNAME): $(OBJ_ZLIB) $(OBJ_BZIP2) $(OBJ_GIFLIB) $(OBJ_PACKJPG)
	g++ $(CFLAGS) $(OBJECTS) precomp.cpp -s -oprecomp

packjpg: $(SRC_PACKJPG)
	g++ -c $(FLAGS_PACKJPG) $(SRC_PACKJPG)

%.o: %.c
	gcc -g -c $(CFLAGS) $<<commit_msg>Modify main Makefile to use contrib Makefiles (prevent cluttering the main directory with contrib object files)<commit_after>PROGNAME      = precomp
BZIP2_OBJ     = contrib/bzip2/blocksort.o contrib/bzip2/compress.o contrib/bzip2/decompress.o contrib/bzip2/randtable.o contrib/bzip2/bzlib.o contrib/bzip2/crctable.o contrib/bzip2/huffman.o
GIFLIB_OBJ    = contrib/giflib/dgif_lib_gcc.o contrib/giflib/egif_lib_gcc.o contrib/giflib/gifalloc.o contrib/giflib/gif_err.o
PACKJPG_OBJ   = contrib/packjpg/aricoder.o contrib/packjpg/bitops.o contrib/packjpg/packjpg.o
ZLIB_OBJ      = contrib/zlib/adler32.o contrib/zlib/crc32.o contrib/zlib/zutil.o contrib/zlib/trees.o contrib/zlib/inftrees.o contrib/zlib/inffast.o contrib/zlib/inflate.o contrib/zlib/deflate.o
CFLAGS        = -DLINUX -D_FILE_OFFSET_BITS=64 -O2 -Wall

.PHONY: all
all: contrib $(PROGNAME)

.PHONY: clean
clean:
	make -C contrib/bzip2 clean
	make -C contrib/giflib clean
	make -C contrib/packjpg clean
	make -C contrib/zlib clean
	rm -f *.o

bzip2:
	make -C contrib/bzip2

giflib:
	make -C contrib/giflib

packjpg:
	make -C contrib/packjpg

zlib:
	make -C contrib/zlib

contrib: bzip2 giflib packjpg zlib

$(PROGNAME): contrib
	g++ $(CFLAGS) $(GIFLIB_OBJ) $(PACKJPG_OBJ) $(BZIP2_OBJ) $(ZLIB_OBJ) precomp.cpp -s -oprecomp
{'fraction_non_alphanumeric': 0.12168719671519224, 'fraction_numerical': 0.01530421799178798, 'mean_word_length': 4.124282982791587, 'pattern_counts': {'":': 0, '<': 4, '<?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': '27487', 'n_tokens_mistral': 1213, 'n_tokens_neox': 1117, 'n_words': 210}