<commit_before>#
# Makefile for libsedna
#

PP = ../..

VPATH = . $(PP)/kernel/common/u $(PP)/kernel/common/errdbg $(PP)/kernel/common

include $(PP)/Makefile.include


ifeq ("$(PLATFORM)", "WIN32")
all: libsednamt$(LIB_EXT) libsedna$(LIB_EXT)
	@echo ===================================================================
	@echo C API done
	@echo ===================================================================
else
all: libsedna$(LIB_EXT) 
	@echo ===================================================================
	@echo C API done
	@echo ===================================================================
endif

OBJS = libsedna$(OBJ_EXT) usocket$(OBJ_EXT) uhdd$(OBJ_EXT) sp$(OBJ_EXT) \
       uutils$(OBJ_EXT) usecurity$(OBJ_EXT) d_printf$(OBJ_EXT) \
       error_codes$(OBJ_EXT) u$(OBJ_EXT)

ifneq ($(findstring clean, $(MAKECMDGOALS)), clean)
ifndef NO_DEP
include $(OBJS:$(OBJ_EXT)=.d)
endif
endif

MT_OBJS =     $(OBJS:$(OBJ_EXT)=.mt$(OBJ_EXT))
ST_OBJS =     $(OBJS:$(OBJ_EXT)=.st$(OBJ_EXT))
DLL_MT_OBJS = $(OBJS:$(OBJ_EXT)=.dl.mt$(OBJ_EXT))
DLL_ST_OBJS = $(OBJS:$(OBJ_EXT)=.dl.st$(OBJ_EXT))


ifeq ("$(PLATFORM)", "WIN32")
# WIN32
OBJ_NAME = /Fo
CFLAGS += /DSE_NO_EVENT_LOG
CFLAGS_ST += /DSE_NO_EVENT_LOG

# multi-threaded static library
libsednamt$(LIB_EXT): $(MT_OBJS)
	  $(LB) $(LIBFLAGS) $(LIBOUT)$@ $^

%.mt$(OBJ_EXT): %.d

%.mt$(OBJ_EXT): %.c
	$(CC) $(CFLAGS) $(OBJ_NAME)$@ $<

# single-threaded static library
libsedna$(LIB_EXT): $(ST_OBJS)
	  $(LB) $(LIBFLAGS) $(LIBOUT)$@ $^

%.st$(OBJ_EXT): %.d

%.st$(OBJ_EXT): %.c
	$(CC) $(CFLAGS_ST) $(OBJ_NAME)$@ $<

# multi-threaded dynamic library
#libsednamt$(DL_EXT): $(DLL_OBJS)
#	link /DLL $(LIBFLAGS) $(LIBOUT)$@ $^

#%.dl$(OBJ_EXT): %.c
#	$(CC) $(CFLAGS) /MD $(OBJ_NAME)$@ $<

else
# UNIX 
OBJ_NAME = -o
CFLAGS += -DSE_NO_EVENT_LOG

libsedna$(LIB_EXT): $(MT_OBJS)
	  $(LB) $(LIBFLAGS) $(LIBOUT)$@ $^

%.mt$(OBJ_EXT): %.d

%.mt$(OBJ_EXT): %.c<commit_msg>creating dynamic lib for C-driver<commit_after>#
# Makefile for libsedna
#

PP = ../..

VPATH = . $(PP)/kernel/common/u $(PP)/kernel/common/errdbg $(PP)/kernel/common

include $(PP)/Makefile.include

ifeq ("$(PLATFORM)", "WIN32")
all: libsednamt$(LIB_EXT) libsedna$(LIB_EXT)
	@echo ===================================================================
	@echo C API done
	@echo ===================================================================
else
all: libsedna$(LIB_EXT) 
	@echo ===================================================================
	@echo C API done
	@echo ===================================================================
endif

OBJS = libsedna$(OBJ_EXT) usocket$(OBJ_EXT) uhdd$(OBJ_EXT) sp$(OBJ_EXT) \
       uutils$(OBJ_EXT) usecurity$(OBJ_EXT) d_printf$(OBJ_EXT) \
       error_codes$(OBJ_EXT) u$(OBJ_EXT)

ifneq ($(findstring clean, $(MAKECMDGOALS)), clean)
ifndef NO_DEP
include $(OBJS:$(OBJ_EXT)=.d)
endif
endif

MT_OBJS =     $(OBJS:$(OBJ_EXT)=.mt$(OBJ_EXT))
ST_OBJS =     $(OBJS:$(OBJ_EXT)=.st$(OBJ_EXT))
DLL_MT_OBJS = $(OBJS:$(OBJ_EXT)=.dl.mt$(OBJ_EXT))
DLL_ST_OBJS = $(OBJS:$(OBJ_EXT)=.dl.st$(OBJ_EXT))


ifeq ("$(PLATFORM)", "WIN32")
# WIN32
OBJ_NAME = /Fo
CFLAGS += /DSE_NO_EVENT_LOG
CFLAGS_ST += /DSE_NO_EVENT_LOG

# multi-threaded static library
libsednamt$(LIB_EXT): $(MT_OBJS)
	  $(LB) $(LIBFLAGS) $(LIBOUT)$@ $^

%.mt$(OBJ_EXT): %.d

%.mt$(OBJ_EXT): %.c
	$(CC) $(CFLAGS) $(OBJ_NAME)$@ $<

# single-threaded static library
libsedna$(LIB_EXT): $(ST_OBJS)
	  $(LB) $(LIBFLAGS) $(LIBOUT)$@ $^

%.st$(OBJ_EXT): %.d

%.st$(OBJ_EXT): %.c
	$(CC) $(CFLAGS_ST) $(OBJ_NAME)$@ $<

# multi-threaded dynamic library
# libsednamt$(DL_EXT): $(DLL_MT_OBJS)
#	link /DLL  $(LIBFLAGS) $(LIBOUT)$@ $^ wsock32.lib Advapi32.lib
#
#%.dl.mt$(OBJ_EXT): %.d
#
#%.dl.mt$(OBJ_EXT): %.c
#	$(CC) $(CFLAGS) /MD $(OBJ_NAME)$@ $<

else
# UNIX 
OBJ_NAME = -o
CFLAGS += -DSE_NO_EVENT_LOG

libsedna$(LIB_EXT): $(MT_OBJS)
	  $(LB) $(LIBFLAGS) $(LIBOUT)$@ $^

%.mt$(OBJ_EXT): %.d

%.mt$(OBJ_EXT): %.c
{'fraction_non_alphanumeric': 0.3325670498084291, 'fraction_numerical': 0.004086845466155811, 'mean_word_length': 5.798611111111111, 'pattern_counts': {'":': 0, '<': 9, '<?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': '3051189', 'n_tokens_mistral': 1657, 'n_tokens_neox': 1502, 'n_words': 271}