<commit_before>default:
	@clang disk_analyzer.c ../util/color.c ext2/ext2.c ext4/ext4.c ntfs/ntfs.c mbr/mbr.c \
		   ../bson/bson-encoder.c \
		   ../util/util.c \
		   -o disk_analyzer \
		   -Wall \
		   -Werror \
		   -I../util \
		   -I../bson \
		   -I./ext2/ \
		   -I./ext4/ \
		   -I./ntfs/ \
		   -I./mbr/ \
		   -g
	@clang ext2/tools/inode_explorer.c ext2/ext2.c \
		   ../util/color.c mbr/mbr.c \
		   ../bson/bson-encoder.c \
		   ../util/util.c \
		   -o ext2_inode_explorer \
		   -Wall \
		   -Werror \
		   -I../util \
		   -I../bson \
		   -I./ext2/ \
		   -I./mbr/
	@clang ext2/tools/data_block_explorer.c ext2/ext2.c \
		   ../util/color.c mbr/mbr.c \
		   ../bson/bson-encoder.c \
		   ../util/util.c \
		   -o ext2_data_block_explorer \
		   -Wall \
		   -Werror \
		   -I../util \
		   -I../bson \
		   -I./ext2/ \
		   -I./mbr	
	@clang ext4/tools/inode_explorer.c ext4/ext4.c \
		   ../util/color.c mbr/mbr.c \
		   ../bson/bson-encoder.c \
		   ../util/util.c \
		   -o ext4_inode_explorer \
		   -Wall \
		   -Werror \
		   -I../util \
		   -I../bson \
		   -I./ext4/ \
		   -I./mbr/
	@clang ext4/tools/data_block_explorer.c ext4/ext4.c \
		   ../util/color.c mbr/mbr.c \
		   ../bson/bson-encoder.c \
		   ../util/util.c \
		   -o ext4_data_block_explorer \
		   -Wall \
		   -Werror \
		   -I../util \
		   -I../bson \
		   -I./ext4/ \
		   -I./mbr//
	@clang ntfs/tools/file_record_differ.c ntfs/ntfs.c \
		   ../util/color.c mbr/mbr.c \
		   ../bson/bson-encoder.c \
		   ../util/util.c \
		   -o ntfs_file_record_differ \
		   -Wall \
		   -Werror \
		   -I../util \
		   -I../bson \
		   -I./ntfs/ \
		   -I./mbr/

test: default
	@rm -rf /tmp/win7
	@mkdir /tmp/win7
	@./disk_analyzer \
		/home/wolf/VM/win7enterprise.raw \
		/tmp/win7enterprise.bson #| grep found > fnames

	#@valgrind --track-origins=yes ./disk_analyzer \
		#/home/wolf/VM/win7enterprise.raw \
		#/tmp/win7enterprise.bson

test_ext4: default
	@./disk_analyzer \
		/home/wolf/VM/vm_ext4_test/vm_ext4_test.raw \
		/tmp/ext4_test

test_tinycore: default
	@valgrind --track-origins=yes ./disk_analyzer \
		/home/wolf/Dropbox/Projects/xray/sample/tinycore.raw \
		/tmp/tinycore.bson

	@../bson/bson_printer /tmp/tinycore.bson | less -R

clean:
	@rm disk_analyzer \
		ext2_data_block_explorer \
		ntfs_file_record_differ \
	    ext2_inode_explorer \
	    ext4_data_block_explorer \
	    ext4_inode_explorer	

inode_explorer: default
	./inode_explorer /home/wolf/Dropbox/Projects/xray/sample/tinycore.raw <commit_msg>disk_analyzer: updated test_ext4 rule for dev<commit_after>default:
	@clang disk_analyzer.c ../util/color.c ext2/ext2.c ext4/ext4.c ntfs/ntfs.c mbr/mbr.c \
		   ../bson/bson-encoder.c \
		   ../util/util.c \
		   -o disk_analyzer \
		   -Wall \
		   -Werror \
		   -I../util \
		   -I../bson \
		   -I./ext2/ \
		   -I./ext4/ \
		   -I./ntfs/ \
		   -I./mbr/ \
		   -g
	@clang ext2/tools/inode_explorer.c ext2/ext2.c \
		   ../util/color.c mbr/mbr.c \
		   ../bson/bson-encoder.c \
		   ../util/util.c \
		   -o ext2_inode_explorer \
		   -Wall \
		   -Werror \
		   -I../util \
		   -I../bson \
		   -I./ext2/ \
		   -I./mbr/
	@clang ext2/tools/data_block_explorer.c ext2/ext2.c \
		   ../util/color.c mbr/mbr.c \
		   ../bson/bson-encoder.c \
		   ../util/util.c \
		   -o ext2_data_block_explorer \
		   -Wall \
		   -Werror \
		   -I../util \
		   -I../bson \
		   -I./ext2/ \
		   -I./mbr	
	@clang ext4/tools/inode_explorer.c ext4/ext4.c \
		   ../util/color.c mbr/mbr.c \
		   ../bson/bson-encoder.c \
		   ../util/util.c \
		   -o ext4_inode_explorer \
		   -Wall \
		   -Werror \
		   -I../util \
		   -I../bson \
		   -I./ext4/ \
		   -I./mbr/
	@clang ext4/tools/data_block_explorer.c ext4/ext4.c \
		   ../util/color.c mbr/mbr.c \
		   ../bson/bson-encoder.c \
		   ../util/util.c \
		   -o ext4_data_block_explorer \
		   -Wall \
		   -Werror \
		   -I../util \
		   -I../bson \
		   -I./ext4/ \
		   -I./mbr//
	@clang ntfs/tools/file_record_differ.c ntfs/ntfs.c \
		   ../util/color.c mbr/mbr.c \
		   ../bson/bson-encoder.c \
		   ../util/util.c \
		   -o ntfs_file_record_differ \
		   -Wall \
		   -Werror \
		   -I../util \
		   -I../bson \
		   -I./ntfs/ \
		   -I./mbr/

test: default
	@rm -rf /tmp/win7
	@mkdir /tmp/win7
	@./disk_analyzer \
		/home/wolf/VM/win7enterprise.raw \
		/tmp/win7enterprise.bson #| grep found > fnames

	#@valgrind --track-origins=yes ./disk_analyzer \
		#/home/wolf/VM/win7enterprise.raw \
		#/tmp/win7enterprise.bson

test_ext4: default
	@./disk_analyzer \
		/home/wolf/VM/vm_ext4_test/vm_ext4_test.raw \
		/home/wolf/Dropbox/Projects/xray/sample/ext4_index.bson
	@../bson/bson_printer \
		/home/wolf/Dropbox/Projects/xray/sample/ext4_index.bson | \
		head -n 10
	@ls -lah /home/wolf/Dropbox/Projects/xray/sample/ext4_index.bson
	@gzip --best -c \
		/home/wolf/Dropbox/Projects/xray/sample/ext4_index.bson \
		> /tmp/ext4_index.bson.gz
	@ls -lah /tmp/ext4_index.bson.gz

test_tinycore: default
	@valgrind --track-origins=yes ./disk_analyzer \
		/home/wolf/Dropbox/Projects/xray/sample/tinycore.raw \
		/tmp/tinycore.bson

	@../bson/bson_printer /tmp/tinycore.bson | less -R

clean:
	@rm disk_analyzer \
		ext2_data_block_explorer \
		ntfs_file_record_differ \
	    ext2_inode_explorer \
	    ext4_data_block_explorer \
	    ext4_inode_explorer	

inode_explorer: default
	./inode_explorer /home/wolf/Dropbox/Projects/xray/sample/tinycore.raw 
{'fraction_non_alphanumeric': 0.17475908080059302, 'fraction_numerical': 0.01630837657524092, 'mean_word_length': 1.5822966507177034, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '3798664', 'n_tokens_mistral': 2704, 'n_tokens_neox': 2391, 'n_words': 305}