Skip to content

Commit

Permalink
Merge pull request DOCGroup#210 from jwillemsen/jwi-ws32bmake
Browse files Browse the repository at this point in the history
Simplify linking with ws2_32 with bmake bcc64x
  • Loading branch information
jwillemsen authored Apr 26, 2024
2 parents df594ae + 4ae71a4 commit 5b4c244
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions templates/bmake.mpd
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ THREAD_FLAGS = <%thr_flags%>
LIB_EXT = <%lib_ext%>
COMMON_DEFINES =<%foreach(common_defines)%> -D<%common_define%><%endfor%>
COMMON_FLAGS = <%foreach(common_flags)%><%common_flag%><%endfor%>
PLATFORM_LIBS_PREFIX = <%platform_libs_prefix%>
OBJ_EXT = <%obj_ext%>
LINKER_PATHS = <%linker_paths%>
STARTUP_BITS = <%startup_bits%>
Expand Down Expand Up @@ -161,6 +162,9 @@ LIBFILES = \
<%foreach(reverse(lit_libs))%>
<%lit_lib%>$(LIB_EXT) \
<%endfor%>
<%foreach(reverse(platform_libs))%>
$(PLATFORM_LIBS_PREFIX)<%platform_libs%> \
<%endfor%>
<%foreach(reverse(pure_libs))%>
<%pure_lib%> \
<%endfor%>
Expand Down
8 changes: 6 additions & 2 deletions templates/bmakecommon.mpt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ linker_paths = -L\"$(BDS)\lib\win32\release\" -L\"$(BDS)\lib\win32\debug\"
startup_bits = 32
link = ilink32
common_libs = ws2_32$(LIB_EXT) import32$(LIB_EXT) cw32mti$(LIB_EXT) $(CG_LIB)
platform_libs_prefix =
tlib = tlib
pch = 1
ccflags = -q
Expand Down Expand Up @@ -60,6 +61,7 @@ linker_paths = -L\"$(BDS)\lib\win32c\debug\" -L\"$(BDS)\lib\win32c\release\"
startup_bits = 32
link = ilink32
common_libs = ws2_32$(LIB_EXT) import32$(LIB_EXT) cw32mti$(LIB_EXT)
platform_libs_prefix =
tlib = tlib
ccflags = -q
dllflags = -Tpd -Gi -x -Gn -w-dup
Expand Down Expand Up @@ -87,6 +89,7 @@ linker_paths = -L\"$(BDS)\lib\win64\debug\" -L\"$(BDS)\lib\win64\release\" -GE:H
startup_bits = 64
link = ilink64
common_libs = ws2_32$(LIB_EXT) import64$(LIB_EXT) cw64mti$(LIB_EXT)
platform_libs_prefix =
tlib = tlib64
ccflags = -q
dllflags = -Tpd -Gi -x -Gn -w-dup
Expand All @@ -110,11 +113,12 @@ lib_ext = .lib
common_defines = WIN32 _WINDOWS WIN64
common_flags = -Qunused-arguments
obj_ext = .o
linker_paths = -L\"$(BDS)\lib\win64x\debug\" -L\"$(BDS)\lib\win64x\release\" -L\"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x64\" -L\"$(BDS)\x86_64-w64-mingw32\lib\" -L\"$(BDS)\lib\clang\15.0.7\lib\windows\"
linker_paths = -L\"$(BDS)\lib\win64x\debug\" -L\"$(BDS)\lib\win64x\release\" -L\"$(BDS)\x86_64-w64-mingw32\lib\" -L\"$(BDS)\lib\clang\15.0.7\lib\windows\"
startup_bits = 64
ccflags = -q
link = ld.lld
common_libs = crtbegin.o ws2_32$(LIB_EXT) -lmoldname -lucrt -lmingw32 -lmingwex -l\"c++\" -lunwind -lmingwthrd -l:import64$(LIB_EXT) libclang_rt.builtins-x86_64.a
common_libs = crtbegin.o -lws2_32 -lmoldname -lucrt -lmingw32 -lmingwex -l\"c++\" -lunwind -lmingwthrd -l:import64$(LIB_EXT) -lclang_rt.builtins-x86_64
platform_libs_prefix = -l
dll_libs = dllcrt2.o
exe_libs = crt2.o
tlib = tlib64
Expand Down

0 comments on commit 5b4c244

Please sign in to comment.