<commit_before>CC	?= gcc
CFLAGS ?= -O2
LDFLAGS += -ludev -lmount
CFDEBUG = -g3 -pedantic -Wall -Wunused-parameter -Wlong-long\
		  -Wsign-conversion -Wconversion -Wimplicit-function-declaration

EXEC = ldm
SRCS = ldm.c
OBJS = ${SRCS:.c=.o}

PREFIX?=/usr
BINDIR=${PREFIX}/bin
SYSTEMDDIR=/usr/lib/systemd/system

all: ${EXEC}

.c.o:
	${CC} ${CFLAGS} -o $@ -c $<

${EXEC}: ${OBJS}
	${CC} ${LDFLAGS} -o ${EXEC} ${OBJS}

debug: ${EXEC}
debug: CC += ${CFDEBUG}

clean:
	rm -rf ./*.o
	rm -rf ./ldm

mrproper: clean
	rm ${EXEC}

install-main: ldm
	test -d ${DESTDIR}${BINDIR} || mkdir -p ${DESTDIR}${BINDIR}
	install -m755 ldm ${DESTDIR}${BINDIR}/ldm

install-systemd: ldm.service
	test -d ${DESTDIR}${SYSTEMDDIR} || mkdir -p ${DESTDIR}${SYSTEMDDIR}
	install -m644 ldm.service ${DESTDIR}${SYSTEMDDIR}/

install: all install-main install-systemd

.PHONY: all debug clean mrproper install install-main install-systemd<commit_msg>Fix Makefile<commit_after>CC ?= gcc
CFLAGS := -O2 $(CFLAGS)
LDFLAGS := -ludev -lmount $(LDFLAGS)
CFDEBUG = -g3 -pedantic -Wall -Wunused-parameter -Wlong-long
CFDEBUG += -Wsign-conversion -Wconversion -Wimplicit-function-declaration

PREFIX ?= /usr/local
BINDIR ?= $(PREFIX)/bin
SYSTEMDDIR ?= $(PREFIX)/lib/systemd

EXEC = ldm
SRCS = ldm.c
OBJS = $(SRCS:.c=.o)

all: $(EXEC)

.c.o:
	$(CC) $(CFLAGS) -o $@ -c $<

$(EXEC): $(OBJS)
	$(CC) $(LDFLAGS) -o $(EXEC) $(OBJS)

debug: $(EXEC)
debug: CC += $(CFDEBUG)

clean:
	$(RM) *.o ldm

mrproper: clean
	$(RM) $(EXEC)

install-main: ldm
	install -D -m 755 ldm $(DESTDIR)$(BINDIR)/ldm

install-systemd: ldm.service
	install -D -m 644 ldm.service $(DESTDIR)$(SYSTEMDDIR)/system/ldm.service

install: all install-main install-systemd

uninstall:
	$(RM) $(DESTDIR)$(BINDIR)/ldm
	$(RM) $(DESTDIR)$(SYSTEMDDIR)/system/ldm.service

.PHONY: all debug clean mrproper install install-main install-systemd uninstall
{'fraction_non_alphanumeric': 0.1898123324396783, 'fraction_numerical': 0.008579088471849867, 'mean_word_length': 4.1689750692520775, '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': '4747788', 'n_tokens_mistral': 812, 'n_tokens_neox': 775, 'n_words': 183}