mirror of
https://github.com/cesanta/mongoose.git
synced 2025-08-06 05:26:15 +08:00
_mongoose.dll -> mongoose.dll, _mongoose.so -> libbmongoose.so
This commit is contained in:
parent
79cdb77e5d
commit
f935ef832b
6
Makefile
6
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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user