<commit_before>CC = gcc
CFLAGS =  $(shell mysql_config --cflags) $(shell pkg-config --cflags lua) -I inc
LIBS = $(shell mysql_config --libs) $(shell pkg-config --libs lua)  -pthread
TARGET=/usr
VERSION=0.2
BUILDDATE="\"$(shell date +%Y-%m-%d)\""
BUILDMACHINE="\"$(shell uname -mor)\""

mysql:
	$(CC) -c src/mysql.c $(CFLAGS)
net:
	$(CC) -c src/net.c

utils:
	$(CC) -c src/utils.c

actions:
	$(CC) -c src/actions.c

config:
	$(CC) -c src/config.c $(CFLAGS)

main:
	$(CC) -c src/racker.c -DVERSION=$(VERSION) -DBUILDDATE=$(BUILDDATE) -DBUILDMACHINE=$(BUILDMACHINE)

all: mysql net utils actions config main
	$(CC) -o racker *.o $(CFLAGS) $(LIBS)
	
install : all
	@echo creating necessary user for tracker
	@if [ -n "$(shell id racker)" ]; then userdel racker;fi
	@useradd racker
	@echo installing executable file to $(TARGET)/bin
	@mkdir -p $(TARGET)/bin
	@cp -f racker $(TARGET)/bin
	@chmod 755 $(TARGET)/bin/racker
	@echo installing init script to /etc/init.d
	@cp -f racker.init /etc/init.d/racker
	@echo installing default file to /etc/default
	@cp -f racker.default /etc/default/racker
	@echo installing config file to /etc/racker.conf
	@cp -f racker.conf /etc/racker.conf

uninstall: clean
	@rm -rf /etc/racker.conf
	@rm -rf /etc/default/racker
	@rm -rf /etc/init.d/racker
	@rm -rf /var/run/racker.pid
	@rm -rf $(TARGET)/bin/racker

clean:
	@rm -rf racker
	@rm -f *.o

release: clean
	@mkdir racker
	@cp *.c racker/
	@cp *.h racker/
	@cp racker.* racker/
	@cp Makefile racker/
	@cp INSTALL racker/
	@tar cvzf racker-$(shell date +%Y%m%d).tar.gz racker	
	@rm -rf racker
	@mkdir -p releases
	@mv racker-$(shell date +%Y%m%d).tar.gz releases/

pubrelease: release
	@scp releases/racker-$(shell date +%Y%m%d).tar.gz boltzmann.x1598.at:/home/matthias/public_html/

data: all
	@mkdir -p debian/usr/bin
	@cp -f racker debian/usr/bin
	@mkdir -p debian/etc/default
	@mkdir -p debian/etc/init.d
	@cp -f racker.default debian/etc/default/racker
	@cp -f racker.init debian/etc/init.d/racker
	@cp -f racker.conf debian/etc
	@mkdir -p debian/usr/share/man/man1
	@cp -f racker.1.gz debian/usr/share/man/man1
	@mkdir -p debian/usr/share/doc/racker
	@cp -f racker.sql debian/usr/share/doc/racker/

debian: data
	@mkdir -p debian/DEBIAN
	@cp -f racker.control debian/DEBIAN/control
	@dpkg-deb --build debian racker_$(VERSION)_x86.deb
	@rm -rf debian<commit_msg>reorganised Makefile<commit_after>VERSION=0.2
CC = gcc
CFLAGS =  -static -Wall -ansi -pedantic -g $(shell pkg-config --cflags libconfig) -I inc -DVERSION=$(VERSION) -DBUILDDATE=$(BUILDDATE) -DBUILDMACHINE=$(BUILDMACHINE)
LDFLAGS = $(shell pkg-config --libs libconfig)
TARGET=/usr
BUILDDATE="\"$(shell date +%Y-%m-%d)\""
BUILDMACHINE="\"$(shell uname -mor)\""
OBJ = net.o utils.o actions.o config.o racker.o

all: $(OBJ)
	$(CC) $(CFLAGS) -o racker $(OBJ) $(LDFLAGS)
	

%.o: src/%.c
	$(CC) $(CFLAGS) -c $< 

clean:
	@rm -rf racker
	@rm -f *.o
{'fraction_non_alphanumeric': 0.17422930377554555, 'fraction_numerical': 0.005542085209560097, 'mean_word_length': 3.5624012638230647, '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': '2661916', 'n_tokens_mistral': 1255, 'n_tokens_neox': 1190, 'n_words': 315}