From f935ef832b4d191feaabc29ffcab2c6ddbe5536d Mon Sep 17 00:00:00 2001 From: Sergey Lyubka Date: Sat, 22 Sep 2012 12:52:47 +0100 Subject: [PATCH] _mongoose.dll -> mongoose.dll, _mongoose.so -> libbmongoose.so --- Makefile | 6 +++--- bindings/python/mongoose.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 6f29f0aa..75855bf1 100644 --- a/Makefile +++ b/Makefile @@ -27,14 +27,14 @@ GCC_WARNS = -W -Wall -pedantic CFLAGS = -std=c99 -O2 $(GCC_WARNS) $(COPT) MAC_SHARED = -flat_namespace -bundle -undefined suppress LINFLAGS = -ldl -pthread $(CFLAGS) -LIB = _$(PROG).so +LIB = lib$(PROG).so$(MONGOOSE_LIB_SUFFIX) # Make sure that the compiler flags come last in the compilation string. # If not so, this can break some on some Linux distros which use # "-Wl,--as-needed" turned on by default in cc command. # Also, this is turned in many other distros in static linkage builds. linux: - $(CC) mongoose.c -shared -fPIC -fpic -o $(LIB) $(LINFLAGS) + $(CC) mongoose.c -shared -fPIC -fpic -o $(LIB) -Wl,-soname,$(LIB) $(LINFLAGS) $(CC) mongoose.c main.c -o $(PROG) $(LINFLAGS) bsd: @@ -121,7 +121,7 @@ MINGWOPT= -W -Wall -mthreads -Wl,--subsystem,console $(MINGWDBG) -DHAVE_STDINT mingw: windres win32\res.rc win32\res.o $(CC) $(MINGWOPT) mongoose.c -lws2_32 \ - -shared -Wl,--out-implib=$(PROG).lib -o _$(PROG).dll + -shared -Wl,--out-implib=$(PROG).lib -o $(PROG).dll $(CC) $(MINGWOPT) -Iwin32 mongoose.c main.c win32\res.o -lws2_32 -ladvapi32 \ -o $(PROG).exe diff --git a/bindings/python/mongoose.py b/bindings/python/mongoose.py index a1ba7d95..d67ea454 100644 --- a/bindings/python/mongoose.py +++ b/bindings/python/mongoose.py @@ -123,9 +123,9 @@ class Mongoose(object): def __init__(self, callback, **kwargs): if os.name == 'nt': - self.dll = ctypes.WinDLL('_mongoose.dll') + self.dll = ctypes.WinDLL('mongoose.dll') else: - self.dll = ctypes.CDLL('_mongoose.so') + self.dll = ctypes.CDLL('libmongoose.so') self.dll.mg_start.restype = ctypes.c_void_p self.dll.mg_modify_passwords_file.restype = ctypes.c_int