aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPali Rohár <pali.rohar@gmail.com>2024-11-21 01:52:34 +0100
committerSilvio Traversaro <silvio.traversaro@gbionics.ai>2026-05-20 22:36:45 +0200
commit039e61578e868f229e30d4f4c25f9d6c3a4755ce (patch)
treeeee2855e59450763046121cb1f166d52c5266cee /Makefile
parent77152633a5d3d151107ce9a7b876747bce83c8d3 (diff)
downloaddlfcn-win32-fixpatches.tar.gz
dlfcn-win32-fixpatches.tar.bz2
dlfcn-win32-fixpatches.zip
For non-debug DLL builds avoid linking to CRT library as it is not neededfixpatches
Now when dlfcn.c does not call any function from CRT library, it is not needed to link dlfcn library with some specific CRT library (e.g. crtdll.dll, msvcrt.dll, msvcr120.dll or api-ms-win-crt-*.dll) and therefore bound the dlfcn DLL library to specific Visual C++ runtime version. This makes libdl.dll DLL library CRT-neutral and therefore can be used or linked into any EXE application using any CRT library of any version, without any Visual C++ runtime version conflict.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 899334a..a8a3e65 100644
--- a/Makefile
+++ b/Makefile
@@ -32,7 +32,7 @@ libdl.a: $(SOURCES)
32 $(RANLIB) $@ 32 $(RANLIB) $@
33 33
34libdl.dll: $(SOURCES) 34libdl.dll: $(SOURCES)
35 $(CC) $(CFLAGS) $(SHFLAGS) -DDLFCN_WIN32_SHARED -shared -o $@ $^ 35 $(CC) $(CFLAGS) $(SHFLAGS) -DDLFCN_WIN32_SHARED -DDLFCN_WIN32_SHARED_ENTRYPOINT -D_DllMainCRTStartup=DllMainCRTStartup -nostartfiles -nostdlib -shared -o $@ $^ -lkernel32
36 36
37libdl.lib: libdl.dll 37libdl.lib: libdl.dll
38 $(LIBCMD) /machine:i386 /def:libdl.def 38 $(LIBCMD) /machine:i386 /def:libdl.def