Skip to content

Commit

Permalink
unvendor bitstring
Browse files Browse the repository at this point in the history
  • Loading branch information
ygrek committed Jun 11, 2024
1 parent fab3f8d commit c25f144
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 4,509 deletions.
49 changes: 8 additions & 41 deletions config/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ endif

EXTLIB=src/utils/extlib
CDK=src/utils/cdk
BITSTRING=src/utils/bitstring
LIB=src/utils/lib
NET=src/utils/net
RSS=src/utils/ocamlrss
Expand All @@ -90,7 +89,7 @@ SRC_SOULSEEK=src/networks/soulseek
SRC_DIRECTCONNECT=src/networks/direct_connect
SRC_FILETP=src/networks/fileTP

SUBDIRS=$(EXTLIB) $(CDK) $(BITSTRING) $(LIB) $(RSS) $(XML) $(NET) tools \
SUBDIRS=$(EXTLIB) $(CDK) $(LIB) $(RSS) $(XML) $(NET) tools \
$(COMMON) $(DRIVER) $(MP3) src/config/$(OS_FILES)

INCLUDES += $(foreach file, $(SUBDIRS), -I $(file)) -I +camlp4 $(NUMS_INCLUDE)
Expand Down Expand Up @@ -134,10 +133,6 @@ ifeq ("$(OS_FILES2)", "cygwin")
LIBS_flags += -cclib "resfile.o"
endif

BITSTRING_SRCS = \
$(BITSTRING)/bitstring.ml \
$(BITSTRING)/bitstring_c.c

ifeq ("$(BZIP2)", "yes")
LIBS_flags += -cclib -lbz2
CDK_SRCS += $(CDK)/bzlib.ml $(CDK)/bzip2.ml
Expand Down Expand Up @@ -436,12 +431,6 @@ FASTTRACK_SRCS= \
$(SRC_FASTTRACK)/fasttrackInteractive.mlt \
$(SRC_FASTTRACK)/fasttrackMain.mlt

$(BITSTRING)/bitstring_persistent.cmo: $(BITSTRING)/bitstring_persistent.ml $(BITSTRING)/bitstring_persistent.cmi build/bitstring.cma
$(OCAMLC) -I $(BITSTRING) -I +camlp4 camlp4lib.cma -c $<

$(BITSTRING)/pa_bitstring.cmo: $(BITSTRING)/pa_bitstring.mlt $(BITSTRING)/bitstring_persistent.cmo build/bitstring.cma
$(OCAMLC) -I $(BITSTRING) -I +camlp4 camlp4lib.cma -pp '$(CAMLP4OF) -impl' -c $^

BITTORRENT_SRCS= \
$(SRC_BITTORRENT)/bencode.ml \
$(SRC_BITTORRENT)/bTRate.ml \
Expand Down Expand Up @@ -535,7 +524,7 @@ MLSPLIT_SRCS = \

MAKE_TORRENT_SRCS = \
$(MAGIC_SRCS) $(EXTLIB_SRCS) $(CDK_SRCS) $(LIB_SRCS) $(NET_SRCS) $(MP3TAG_SRCS) \
$(COMMON_SRCS) $(COMMON_CLIENT_SRCS) $(BITSTRING_SRCS) $(BITTORRENT_SRCS) \
$(COMMON_SRCS) $(COMMON_CLIENT_SRCS) $(BITTORRENT_SRCS) \
tools/make_torrent.ml

BT_DHT_NODE_SRCS = \
Expand Down Expand Up @@ -583,32 +572,24 @@ DRIVER_SRCS+= \
ICONS_CMXA=icons.cmxa

CDK_CMXA=cdk.cmxa
BITSTRING_CMXA=
BITSTRING_CMA=
MLNET_SRCS=
ifeq ("$(DONKEY)", "yes")
BITSTRING_CMXA=bitstring.cmxa
BITSTRING_CMA=bitstring.cma
endif
ifeq ("$(BITTORRENT)", "yes")
LIBS_byte += $(NUMS_INCLUDE) nums.cma
LIBS_opt += $(NUMS_INCLUDE) nums.cmxa
BITSTRING_CMXA=bitstring.cmxa
BITSTRING_CMA=bitstring.cma
endif
MLNET_SRCS+= $(MAIN_SRCS)
MLNET_CMXA=extlib.cmxa $(CDK_CMXA) $(BITSTRING_CMXA) magic.cmxa common.cmxa client.cmxa core.cmxa driver.cmxa
MLNET_CMXA=extlib.cmxa $(CDK_CMXA) magic.cmxa common.cmxa client.cmxa core.cmxa driver.cmxa

TESTS_CMXA=extlib.cmxa $(CDK_CMXA) $(BITSTRING_CMXA) magic.cmxa common.cmxa client.cmxa core.cmxa
TESTS_CMXA=extlib.cmxa $(CDK_CMXA) magic.cmxa common.cmxa client.cmxa core.cmxa
TESTS_SRCS=tools/tests.ml

ifeq ("$(GUI)", "newgui2")
mlnet+gui_CMXA= \
$(BITSTRING_CMXA) magic.cmxa extlib.cmxa cdk.cmxa common.cmxa client.cmxa core.cmxa driver.cmxa \
magic.cmxa extlib.cmxa cdk.cmxa common.cmxa client.cmxa core.cmxa driver.cmxa \
icons.cmxa guibase.cmxa gui.cmxa
else
mlnet+gui_CMXA= \
$(BITSTRING_CMXA) magic.cmxa extlib.cmxa cdk.cmxa common.cmxa client.cmxa core.cmxa driver.cmxa \
magic.cmxa extlib.cmxa cdk.cmxa common.cmxa client.cmxa core.cmxa driver.cmxa \
gmisc.cmxa icons.cmxa guibase.cmxa gui.cmxa
endif

Expand Down Expand Up @@ -1138,7 +1119,7 @@ top: mldonkeytop
runtop: top
./mldonkeytop $(INCLUDES)

TOP_CMXA+=$(BITSTRING_CMA) extlib.cmxa cdk.cmxa magic.cmxa common.cmxa client.cmxa core.cmxa
TOP_CMXA+=extlib.cmxa cdk.cmxa magic.cmxa common.cmxa client.cmxa core.cmxa
TOP_SRCS=

define([[EXPAND_LIB]],[[
Expand Down Expand Up @@ -1182,13 +1163,6 @@ endif

ifeq ("$2", "DONKEY")
$1_SRCS+= $(CRYPTOPP_SRCS)
$1_CMXA+= $(BITSTRING_CMXA)
$1+gui_CMXA+= $(BITSTRING_CMXA)
else
ifeq ("$2", "BITTORRENT")
$1_CMXA+= $(BITSTRING_CMXA)
$1+gui_CMXA+= $(BITSTRING_CMXA)
endif
endif

$1_CMXA+= extlib.cmxa cdk.cmxa magic.cmxa common.cmxa client.cmxa $1.cmxa driver.cmxa
Expand Down Expand Up @@ -1224,7 +1198,6 @@ EXPAND_DRIVER(mlslsk,SOULSEEK,soulseek)
libextlib_SRCS= $(EXTLIB_SRCS)
libcdk_SRCS= $(CDK_SRCS) $(LIB_SRCS) $(NET_SRCS) $(MP3TAG_SRCS)
libmagic_SRCS= $(MAGIC_SRCS)
libbitstring_SRCS= $(BITSTRING_SRCS)
libcommon_SRCS= $(COMMON_SRCS)
libclient_SRCS= $(COMMON_CLIENT_SRCS)
ifeq ("$(GUI)", "newgui2")
Expand All @@ -1241,7 +1214,6 @@ EXPAND_LIB(libextlib,extlib)
EXPAND_LIB(libicons,icons)
EXPAND_LIB(libcdk,cdk)
EXPAND_LIB(libmagic,magic)
EXPAND_LIB(libbitstring,bitstring)
EXPAND_LIB(libupnp_natpmp,upnp_natpmp)
EXPAND_LIB(libcommon,common)
EXPAND_LIB(libclient,client)
Expand Down Expand Up @@ -1333,7 +1305,7 @@ $2.byte.static: $($1_OBJS) $($1_CMOS) $($1_CMAS)
# $5 = if set link GD code
# $6 = if set link CryptoPP code (only for targets mlnet, mldonkey)
# $7 = if set link libmagic code (only for p2p core, not for GUIs, tools etc.)
# $8 = if set link libbitstring code (only for Bittorrent p2p core)
# $8 = external lib
# $9 = if set link libminiupnpc & libnatpmp code

EXPAND(mldonkey,mldonkey,NO,mldonkey,GD,CRYPTOPP,MAGIC,BITSTRING,UPNP_NATPMP)
Expand Down Expand Up @@ -1501,8 +1473,6 @@ releaseclean: clean moreclean
rm -f src/networks/bittorrent/bTUdpTracker.ml
rm -f src/networks/donkey/donkeySui.ml
rm -f src/networks/donkey/donkeyNodesDat.ml
rm -f src/utils/bitstring/bitstring.ml
rm -f src/utils/bitstring/bitstring_persistent.ml
rm -f src/utils/lib/autoconf.ml
rm -f src/utils/lib/autoconf.ml.new
rm -f src/utils/lib/gAutoconf.ml
Expand Down Expand Up @@ -1849,9 +1819,6 @@ rpm: sourcedist
.mlcpp.ml:
@$(CPP) -x c -DOCAMLVERSION_MAJOR=$(OCAMLVERSION_MAJOR) -P $< $(FIX_BROKEN_CPP) > $@

%.ml: %.mlp $(BITSTRING)/pa_bitstring.cmo
$(CAMLP4OF) build/bitstring.cma $(BITSTRING)/bitstring_persistent.cmo $(BITSTRING)/pa_bitstring.cmo -impl $< -o $@

.mll.ml :
@$(OCAMLLEX) -q $<

Expand Down
1 change: 0 additions & 1 deletion config/configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -1580,7 +1580,6 @@ AC_OUTPUT(\
Makefile.config \
mldonkey.rc \
$AUTOCONF.new $GTK_AUTOCONF.new \
../src/utils/bitstring/bitstring.ml \
../src/utils/lib/magic.ml \
../src/networks/donkey/donkeySui.ml \
../src/daemon/driver/driverGraphics.ml \
Expand Down
Loading

0 comments on commit c25f144

Please sign in to comment.