<commit_before>include ../config.mk

.PHONY : clean install

all : libmosquitto.so.0
	make -C cpp

install : all
	make -C cpp install
	$(INSTALL) -d ${DESTDIR}$(prefix)/lib/
	$(INSTALL) -s libmosquitto.so.0 ${DESTDIR}${prefix}/lib/libmosquitto.so.0
	ln -sf libmosquitto.so.0 ${DESTDIR}${prefix}/lib/libmosquitto.so
	$(INSTALL) -d ${DESTDIR}${prefix}/include/
	$(INSTALL) -d mosquitto.h ${DESTDIR}${prefix}/include/mosquitto.h

clean :
	-rm -f *.o libmosquitto.so.0 libmosquitto.so
	make -C cpp clean

libmosquitto.so.0 : mosquitto.o logging_mosq.o messages_mosq.o net_mosq.o read_handle.o read_handle_client.o send_mosq.o send_client_mosq.o util_mosq.o
	$(CC) -shared -Wl,-soname,libmosquitto.so.0 $^ -o $@ 

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

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

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

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

read_handle.o : read_handle.c read_handle.h
	$(CC) $(CFLAGS) -fPIC -c $< -o $@<commit_msg>Don't try to install mosquitto.h as a directory.<commit_after>include ../config.mk

.PHONY : clean install

all : libmosquitto.so.0
	make -C cpp

install : all
	make -C cpp install
	$(INSTALL) -d ${DESTDIR}$(prefix)/lib/
	$(INSTALL) -s libmosquitto.so.0 ${DESTDIR}${prefix}/lib/libmosquitto.so.0
	ln -sf libmosquitto.so.0 ${DESTDIR}${prefix}/lib/libmosquitto.so
	$(INSTALL) -d ${DESTDIR}${prefix}/include/
	$(INSTALL) mosquitto.h ${DESTDIR}${prefix}/include/mosquitto.h

clean :
	-rm -f *.o libmosquitto.so.0 libmosquitto.so
	make -C cpp clean

libmosquitto.so.0 : mosquitto.o logging_mosq.o messages_mosq.o net_mosq.o read_handle.o read_handle_client.o send_mosq.o send_client_mosq.o util_mosq.o
	$(CC) -shared -Wl,-soname,libmosquitto.so.0 $^ -o $@ 

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

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

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

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

read_handle.o : read_handle.c read_handle.h
	$(CC) $(CFLAGS) -fPIC -c $< -o $@
{'fraction_non_alphanumeric': 0.17980513728963685, 'fraction_numerical': 0.006200177147918512, 'mean_word_length': 3.7860169491525424, 'pattern_counts': {'":': 0, '<': 13, '<?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': '1913789', 'n_tokens_mistral': 1075, 'n_tokens_neox': 1004, 'n_words': 202}