<commit_before>
include ../port/port.mk

#--------------------------------------------------------------------

ifeq ($(origin version), undefined)
	version = 0.3.0
endif

LIBOBJS = spnklog.o spnkbase64.o spnkini.o spnkfile.o spnkstr.o \
		spnktime.o spnkhash.o \
		spnksocket.o spnklist.o spnkreader.o \
		spnkendpoint.o spnksocketpool.o \
		spnkpop3cli.o \
		spnksmtpaddr.o spnksmtpcli.o \
		spnkhttpmsg.o spnkhttpcli.o \
		spnkmemobj.o spnkmemcli.o \
		spnkicapcli.o spnkmiltercli.o

TARGET =  libspnetkit.so libspnetkit.a \
		teststr \
		testini \
		testpop3cli \
		testsmtpcli \
		testhttpcli \
		testmemproto \
		testmemcli \
		testendpoint \
		testsocketpool \
		testicapcli \
		testmiltercli

TARGET_S = libspnetkit_s.so libspnetkit_s.a \
		testpop3cli_s \
		testsmtpcli_s

OPENSSL_INCL = -I/usr/include/openssl/
OPENSSL_LIB  = -L/usr/lib -lssl -lcrypto

CFLAGS += $(OPENSSL_INCL)

#--------------------------------------------------------------------

all: $(TARGET)

ssl: $(TARGET_S)

libspnetkit.so: $(LIBOBJS)
	$(LINKER) $(SOFLAGS) $^ -o $@
	$(INSTLIB)

libspnetkit.a: $(LIBOBJS)
	$(AR) $@ $^
	$(INSTLIB)

libspnetkit_s.so: spnksslsocket.o
	$(LINKER) $(SOFLAGS) $^ -o $@
	$(INSTLIB)

libspnetkit_s.a: spnksslsocket.o
	$(AR) $@ $^
	$(INSTLIB)

testini: testini.o
	$(LINKER) $(LDFLAGS) $^ -L../lib -lspnetkit -o $@

teststr: teststr.o
	$(LINKER) $(LDFLAGS) $^ -L../lib -lspnetkit -o $@

testpop3cli: testpop3cli.o
	$(LINKER) $(LDFLAGS) $^ -L../lib -lspnetkit -o $@

testsmtpcli: testsmtpcli.o
	$(LINKER) $(LDFLAGS) $^ -L../lib -lspnetkit -o $@

testpop3cli_s: testpop3cli_s.o
	$(LINKER) $(LDFLAGS) -o $@ $^ -L../lib -lspnetkit -lspnetkit_s $(OPENSSL_LIB)

testsmtpcli_s: testsmtpcli_s.o
	$(LINKER) $(LDFLAGS) -o $@ $^ -L../lib -lspnetkit -lspnetkit_s $(OPENSSL_LIB)

testhttpcli: testhttpcli.o
	$(LINKER) $(LDFLAGS) $^ -L../lib -lspnetkit -o $@

testmemproto: testmemproto.o
	$(LINKER) $(LDFLAGS) $^ -L../lib -lspnetkit -o $@<commit_msg>let library stay at current dir<commit_after>
include ../port/port.mk

#--------------------------------------------------------------------

ifeq ($(origin version), undefined)
	version = 0.3.0
endif

LIBOBJS = spnklog.o spnkbase64.o spnkini.o spnkfile.o spnkstr.o \
		spnktime.o spnkhash.o \
		spnksocket.o spnklist.o spnkreader.o \
		spnkendpoint.o spnksocketpool.o \
		spnkpop3cli.o \
		spnksmtpaddr.o spnksmtpcli.o \
		spnkhttpmsg.o spnkhttpcli.o \
		spnkmemobj.o spnkmemcli.o \
		spnkicapcli.o spnkmiltercli.o

TARGET =  libspnetkit.so libspnetkit.a \
		teststr \
		testini \
		testpop3cli \
		testsmtpcli \
		testhttpcli \
		testmemproto \
		testmemcli \
		testendpoint \
		testsocketpool \
		testicapcli \
		testmiltercli

TARGET_S = libspnetkit_s.so libspnetkit_s.a \
		testpop3cli_s \
		testsmtpcli_s

OPENSSL_INCL = -I/usr/include/openssl/
OPENSSL_LIB  = -L/usr/lib -lssl -lcrypto

CFLAGS += $(OPENSSL_INCL)

#--------------------------------------------------------------------

all: $(TARGET)

ssl: $(TARGET_S)

libspnetkit.so: $(LIBOBJS)
	$(LINKER) $(SOFLAGS) $^ -o $@

libspnetkit.a: $(LIBOBJS)
	$(AR) $@ $^

libspnetkit_s.so: spnksslsocket.o
	$(LINKER) $(SOFLAGS) $^ -o $@

libspnetkit_s.a: spnksslsocket.o
	$(AR) $@ $^

testini: testini.o
	$(LINKER) $(LDFLAGS) $^ -L../lib -lspnetkit -o $@

teststr: teststr.o
	$(LINKER) $(LDFLAGS) $^ -L../lib -lspnetkit -o $@

testpop3cli: testpop3cli.o
	$(LINKER) $(LDFLAGS) $^ -L../lib -lspnetkit -o $@

testsmtpcli: testsmtpcli.o
	$(LINKER) $(LDFLAGS) $^ -L../lib -lspnetkit -o $@

testpop3cli_s: testpop3cli_s.o
	$(LINKER) $(LDFLAGS) -o $@ $^ -L../lib -lspnetkit -lspnetkit_s $(OPENSSL_LIB)

testsmtpcli_s: testsmtpcli_s.o
	$(LINKER) $(LDFLAGS) -o $@ $^ -L../lib -lspnetkit -lspnetkit_s $(OPENSSL_LIB)

testhttpcli: testhttpcli.o
	$(LINKER) $(LDFLAGS) $^ -L../lib -lspnetkit -o $@

testmemproto: testmemproto.o
	$(LINKER) $(LDFLAGS) $^ -L../lib -lspnetkit -o $@
{'fraction_non_alphanumeric': 0.22722567287784678, 'fraction_numerical': 0.006211180124223602, 'mean_word_length': 2.5589318600368323, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4287645', 'n_tokens_mistral': 1790, 'n_tokens_neox': 1639, 'n_words': 287}