Forráskód Böngészése

_mongoose.dll -> mongoose.dll, _mongoose.so -> libbmongoose.so

Sergey Lyubka 12 éve
szülő
commit
f935ef832b
2 módosított fájl, 5 hozzáadás és 5 törlés
  1. 3 3
      Makefile
  2. 2 2
      bindings/python/mongoose.py

+ 3 - 3
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
 

+ 2 - 2
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